Skip to content

Commit

Permalink
chore(console,experience): remove dev flags and add changeset for org…
Browse files Browse the repository at this point in the history
…anization updates
  • Loading branch information
xiaoyijun committed May 13, 2024
1 parent f85e1b8 commit 6997365
Show file tree
Hide file tree
Showing 64 changed files with 177 additions and 1,854 deletions.
12 changes: 12 additions & 0 deletions .changeset/loud-mice-divide.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
---
"@logto/console": minor
---

support adding API resource permissions to organization roles and organization permissions in 3rd-party applications

## Updates

- Separated the "Organization template" from the "Organization" page, establishing it as a standalone page for clearer navigation and functionality.
- Enhanced the "Organization template" page by adding functionality that allows users to click on an organization role, which then navigates to the organization role details page where users can view its corresponding permissions and general settings.
- Enabled the assignment of API resource permissions directly from the organization role details page, improving role management and access control.
- Split the permission list for third-party apps into two separate lists: user permissions and organization permissions. Users can now add user profile permissions and API resource permissions for users under user permissions, and add organization permissions and API resource permissions for organizations under organization permissions.
34 changes: 0 additions & 34 deletions packages/console/src/components/OrganizationScopesSelect/index.tsx

This file was deleted.

2 changes: 1 addition & 1 deletion packages/console/src/components/TemplateTable/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ type Props<TFieldValues extends FieldValues, TName extends FieldPath<TFieldValue
readonly errorMessage?: string;
};

export const pageSize = 10;
const pageSize = 10;

/**
* The table component for organization template editing, such as permissions and roles.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,6 @@ export const useSidebarMenuItems = (): {
{
Icon: OrganizationTemplate,
title: 'organization_template',
isHidden: !isDevFeaturesEnabled,
},
],
},
Expand Down
23 changes: 3 additions & 20 deletions packages/console/src/hooks/use-console-routes/index.tsx
Original file line number Diff line number Diff line change
@@ -1,18 +1,12 @@
import { condArray } from '@silverhand/essentials';
import { useMemo } from 'react';
import { Navigate, type RouteObject } from 'react-router-dom';
import { type RouteObject } from 'react-router-dom';

import { isCloud, isDevFeaturesEnabled } from '@/consts/env';
import { isCloud } from '@/consts/env';
import Dashboard from '@/pages/Dashboard';
import GetStarted from '@/pages/GetStarted';
import Mfa from '@/pages/Mfa';
import NotFound from '@/pages/NotFound';
import OrganizationGuide from '@/pages/Organizations/Guide';
import Introduction from '@/pages/Organizations/Guide/Introduction';
import OrganizationInfo from '@/pages/Organizations/Guide/OrganizationInfo';
import OrganizationPermissions from '@/pages/Organizations/Guide/OrganizationPermissions';
import OrganizationRoles from '@/pages/Organizations/Guide/OrganizationRoles';
import { steps } from '@/pages/Organizations/Guide/const';
import SigningKeys from '@/pages/SigningKeys';

import { apiResources } from './routes/api-resources';
Expand Down Expand Up @@ -48,19 +42,8 @@ export const useConsoleRoutes = () => {
users,
auditLogs,
roles,
isDevFeaturesEnabled && organizationTemplate,
organizationTemplate,
organizations,
!isDevFeaturesEnabled && {
path: 'organization-guide/*',
element: <OrganizationGuide />,
children: [
{ index: true, element: <Navigate replace to={steps.introduction} /> },
{ path: steps.introduction, element: <Introduction /> },
{ path: steps.permissions, element: <OrganizationPermissions /> },
{ path: steps.roles, element: <OrganizationRoles /> },
{ path: steps.organizationInfo, element: <OrganizationInfo /> },
],
},
{ path: 'signing-keys', element: <SigningKeys /> },
isCloud && tenantSettings,
customizeJwt
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
import { condArray } from '@silverhand/essentials';
import { Navigate, type RouteObject } from 'react-router-dom';

import { isDevFeaturesEnabled } from '@/consts/env';
import OrganizationDetails from '@/pages/OrganizationDetails';
import Members from '@/pages/OrganizationDetails/Members';
import Settings from '@/pages/OrganizationDetails/Settings';
Expand All @@ -13,10 +12,6 @@ export const organizations: RouteObject = {
children: condArray(
{ index: true, element: <Organizations /> },
{ path: 'create', element: <Organizations /> },
!isDevFeaturesEnabled && {
path: 'template',
element: <Organizations tab="template" />,
},
{
path: ':id/*',
element: <OrganizationDetails />,
Expand Down
4 changes: 2 additions & 2 deletions packages/console/src/pages/OrganizationDetails/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ import TabNav, { TabNavItem } from '@/ds-components/TabNav';
import useApi, { type RequestError } from '@/hooks/use-api';
import useTenantPathname from '@/hooks/use-tenant-pathname';

import Introduction from '../Organizations/Guide/Introduction';
import Introduction from '../Organizations/Introduction';

import * as styles from './index.module.scss';
import { OrganizationDetailsTabs, type OrganizationDetailsOutletContext } from './types';
Expand Down Expand Up @@ -91,7 +91,7 @@ function OrganizationDetails() {
setIsGuideDrawerOpen(false);
}}
>
<Introduction isReadonly />
<Introduction />
</Drawer>
<DeleteConfirmModal
isOpen={isDeleteFormOpen}
Expand Down
4 changes: 2 additions & 2 deletions packages/console/src/pages/OrganizationTemplate/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ import useDocumentationUrl from '@/hooks/use-documentation-url';
import useTenantPathname from '@/hooks/use-tenant-pathname';
import * as pageLayout from '@/scss/page-layout.module.scss';

import Introduction from '../Organizations/Guide/Introduction';
import Introduction from '../Organizations/Introduction';

import * as styles from './index.module.scss';

Expand Down Expand Up @@ -70,7 +70,7 @@ function OrganizationTemplate() {
setIsGuideDrawerOpen(false);
}}
>
<Introduction isReadonly />
<Introduction />
</Drawer>
</div>
{isOrganizationsDisabled && (
Expand Down

This file was deleted.

This file was deleted.

This file was deleted.

0 comments on commit 6997365

Please sign in to comment.