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:
parent
133c4456ab
commit
9a1a88cac0
4 changed files with 9 additions and 24 deletions
|
@ -102,7 +102,6 @@ export const useSidebarMenuItems = (): {
|
||||||
{
|
{
|
||||||
Icon: Organization,
|
Icon: Organization,
|
||||||
title: 'organizations',
|
title: 'organizations',
|
||||||
isHidden: !isDevFeaturesEnabled,
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
Icon: UserProfile,
|
Icon: UserProfile,
|
||||||
|
|
|
@ -174,17 +174,13 @@ function ConsoleContent() {
|
||||||
<Route path={RoleDetailsTabs.M2mApps} element={<RoleApplications />} />
|
<Route path={RoleDetailsTabs.M2mApps} element={<RoleApplications />} />
|
||||||
</Route>
|
</Route>
|
||||||
</Route>
|
</Route>
|
||||||
{isDevFeaturesEnabled && (
|
<Route path="organizations">
|
||||||
<>
|
<Route index element={<Organizations />} />
|
||||||
<Route path="organizations">
|
<Route path="create" element={<Organizations />} />
|
||||||
<Route index element={<Organizations />} />
|
<Route path="template" element={<Organizations tab="template" />} />
|
||||||
<Route path="create" element={<Organizations />} />
|
<Route path=":id/*" element={<OrganizationDetails />} />
|
||||||
<Route path="template" element={<Organizations tab="template" />} />
|
</Route>
|
||||||
<Route path=":id/*" element={<OrganizationDetails />} />
|
<Route path="organization-guide/*" element={<OrganizationGuide />} />
|
||||||
</Route>
|
|
||||||
<Route path="organization-guide/*" element={<OrganizationGuide />} />
|
|
||||||
</>
|
|
||||||
)}
|
|
||||||
<Route path="profile">
|
<Route path="profile">
|
||||||
<Route index element={<Profile />} />
|
<Route index element={<Profile />} />
|
||||||
<Route path="verify-password" element={<VerifyPasswordModal />} />
|
<Route path="verify-password" element={<VerifyPasswordModal />} />
|
||||||
|
|
|
@ -18,7 +18,7 @@ import koaBody from 'koa-body';
|
||||||
import Provider, { errors } from 'oidc-provider';
|
import Provider, { errors } from 'oidc-provider';
|
||||||
import snakecaseKeys from 'snakecase-keys';
|
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 RequestError from '#src/errors/RequestError/index.js';
|
||||||
import { addOidcEventListeners } from '#src/event-listeners/index.js';
|
import { addOidcEventListeners } from '#src/event-listeners/index.js';
|
||||||
import koaAuditLog from '#src/middleware/koa-audit-log.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);
|
addOidcEventListeners(oidc, queries);
|
||||||
|
registerGrants(oidc, envSet, queries);
|
||||||
// DEV: Customized `refresh_token` grant
|
|
||||||
if (EnvSet.values.isDevFeaturesEnabled) {
|
|
||||||
registerGrants(oidc, envSet, queries);
|
|
||||||
}
|
|
||||||
|
|
||||||
// Provide audit log context for event listeners
|
// Provide audit log context for event listeners
|
||||||
oidc.use(koaAuditLog(queries));
|
oidc.use(koaAuditLog(queries));
|
||||||
|
|
|
@ -8,7 +8,6 @@ import {
|
||||||
import { yes } from '@silverhand/essentials';
|
import { yes } from '@silverhand/essentials';
|
||||||
import { z } from 'zod';
|
import { z } from 'zod';
|
||||||
|
|
||||||
import { EnvSet } from '#src/env-set/index.js';
|
|
||||||
import RequestError from '#src/errors/RequestError/index.js';
|
import RequestError from '#src/errors/RequestError/index.js';
|
||||||
import koaGuard from '#src/middleware/koa-guard.js';
|
import koaGuard from '#src/middleware/koa-guard.js';
|
||||||
import koaPagination from '#src/middleware/koa-pagination.js';
|
import koaPagination from '#src/middleware/koa-pagination.js';
|
||||||
|
@ -23,11 +22,6 @@ import organizationScopeRoutes from './scopes.js';
|
||||||
import { errorHandler } from './utils.js';
|
import { errorHandler } from './utils.js';
|
||||||
|
|
||||||
export default function organizationRoutes<T extends AuthedRouter>(...args: RouterInitArgs<T>) {
|
export default function organizationRoutes<T extends AuthedRouter>(...args: RouterInitArgs<T>) {
|
||||||
// Remove after the feature is ready
|
|
||||||
if (!EnvSet.values.isDevFeaturesEnabled) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
const [
|
const [
|
||||||
originalRouter,
|
originalRouter,
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in a new issue