0
Fork 0
mirror of https://github.com/logto-io/logto.git synced 2024-12-16 20:26:19 -05:00

chore: remove dev feature flag for orgs (#4949)

This commit is contained in:
Gao Sun 2023-11-22 16:32:09 +08:00 committed by GitHub
parent 133c4456ab
commit 9a1a88cac0
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 9 additions and 24 deletions

View file

@ -102,7 +102,6 @@ export const useSidebarMenuItems = (): {
{
Icon: Organization,
title: 'organizations',
isHidden: !isDevFeaturesEnabled,
},
{
Icon: UserProfile,

View file

@ -174,8 +174,6 @@ function ConsoleContent() {
<Route path={RoleDetailsTabs.M2mApps} element={<RoleApplications />} />
</Route>
</Route>
{isDevFeaturesEnabled && (
<>
<Route path="organizations">
<Route index element={<Organizations />} />
<Route path="create" element={<Organizations />} />
@ -183,8 +181,6 @@ function ConsoleContent() {
<Route path=":id/*" element={<OrganizationDetails />} />
</Route>
<Route path="organization-guide/*" element={<OrganizationGuide />} />
</>
)}
<Route path="profile">
<Route index element={<Profile />} />
<Route path="verify-password" element={<VerifyPasswordModal />} />

View file

@ -18,7 +18,7 @@ import koaBody from 'koa-body';
import Provider, { errors } from 'oidc-provider';
import snakecaseKeys from 'snakecase-keys';
import { EnvSet } from '#src/env-set/index.js';
import { type EnvSet } from '#src/env-set/index.js';
import RequestError from '#src/errors/RequestError/index.js';
import { addOidcEventListeners } from '#src/event-listeners/index.js';
import koaAuditLog from '#src/middleware/koa-audit-log.js';
@ -281,11 +281,7 @@ export default function initOidc(envSet: EnvSet, queries: Queries, libraries: Li
});
addOidcEventListeners(oidc, queries);
// DEV: Customized `refresh_token` grant
if (EnvSet.values.isDevFeaturesEnabled) {
registerGrants(oidc, envSet, queries);
}
// Provide audit log context for event listeners
oidc.use(koaAuditLog(queries));

View file

@ -8,7 +8,6 @@ import {
import { yes } from '@silverhand/essentials';
import { z } from 'zod';
import { EnvSet } from '#src/env-set/index.js';
import RequestError from '#src/errors/RequestError/index.js';
import koaGuard from '#src/middleware/koa-guard.js';
import koaPagination from '#src/middleware/koa-pagination.js';
@ -23,11 +22,6 @@ import organizationScopeRoutes from './scopes.js';
import { errorHandler } from './utils.js';
export default function organizationRoutes<T extends AuthedRouter>(...args: RouterInitArgs<T>) {
// Remove after the feature is ready
if (!EnvSet.values.isDevFeaturesEnabled) {
return;
}
const [
originalRouter,
{