logto
logto copied to clipboard
feat(console): support assign organization resource scopes for 3rd-party app
Summary
Support adding organization resource scopes in 3rd-party apps
This PR includes the following changes:
- Permissions in 3rd-party apps are now divided into user data and organization data. Consequently, we extracted the original
Permissionscontent to create thePermissionCardcomponent and displayed user and organization permission cards on the page. - Improved the functionality of the scope assignment modal, introducing new API functionalities to add organization resource scopes for applications. Depending on different entry points, it will display content for granting permissions of user data or organization data.
- Enhanced the existing
useResourceScopesAssignmenthook to support passing parameters to specify whether the resource scope is intended for organization use. This allows returning the correct values for scope assignment operations.
Todo:
- Remove
ScopeLevel.All, as this enum value is only used during development to avoid affecting the production version. Once the entire feature is ready, this value will no longer be necessary.
Testing
User data
Organization data
Checklist
~~- [ ] .changeset~~
~~- [ ] unit tests~~
~~- [ ] integration tests~~
- [x] necessary TSDoc comments
COMPARE TO master
Total Size Diff :warning: :chart_with_upwards_trend: +18.48 KB
Diff by File
| Name | Diff |
|---|---|
| packages/console/src/components/FormCard/index.tsx | :chart_with_upwards_trend: +7 Bytes |
| packages/console/src/pages/ApplicationDetails/ApplicationDetailsContent/Permissions/ApplicationScopesAssignmentModal/constants.ts | :chart_with_upwards_trend: +1.02 KB |
| packages/console/src/pages/ApplicationDetails/ApplicationDetailsContent/Permissions/ApplicationScopesAssignmentModal/index.tsx | :chart_with_upwards_trend: +4 KB |
| packages/console/src/pages/ApplicationDetails/ApplicationDetailsContent/Permissions/ApplicationScopesAssignmentModal/type.ts | :chart_with_upwards_trend: +1.01 KB |
| packages/console/src/pages/ApplicationDetails/ApplicationDetailsContent/Permissions/ApplicationScopesAssignmentModal/use-application-scopes-assignment.ts | :chart_with_upwards_trend: +3.29 KB |
| packages/console/src/pages/ApplicationDetails/ApplicationDetailsContent/Permissions/ApplicationScopesAssignmentModal/use-organization-scopes-assignment.ts | :chart_with_upwards_trend: +1.33 KB |
| packages/console/src/pages/ApplicationDetails/ApplicationDetailsContent/Permissions/ApplicationScopesAssignmentModal/use-resource-scopes-assignment.ts | :chart_with_upwards_trend: +2.19 KB |
| packages/console/src/pages/ApplicationDetails/ApplicationDetailsContent/Permissions/ApplicationScopesAssignmentModal/use-user-scopes-assignment.ts | :chart_with_upwards_trend: +1.05 KB |
| packages/console/src/pages/ApplicationDetails/ApplicationDetailsContent/Permissions/ApplicationScopesManagementModal/index.tsx | :chart_with_upwards_trend: +4.42 KB |
| packages/console/src/pages/ApplicationDetails/ApplicationDetailsContent/Permissions/PermissionsCard/ApplicationScopesAssignmentModal/constants.ts | :chart_with_upwards_trend: +1.58 KB |
| packages/console/src/pages/ApplicationDetails/ApplicationDetailsContent/Permissions/PermissionsCard/ApplicationScopesAssignmentModal/index.tsx | :chart_with_upwards_trend: +5.35 KB |
| packages/console/src/pages/ApplicationDetails/ApplicationDetailsContent/Permissions/PermissionsCard/ApplicationScopesAssignmentModal/type.ts | :chart_with_upwards_trend: +1.54 KB |
| packages/console/src/pages/ApplicationDetails/ApplicationDetailsContent/Permissions/PermissionsCard/ApplicationScopesAssignmentModal/use-application-scopes-assignment.ts | :chart_with_upwards_trend: +4.11 KB |
| packages/console/src/pages/ApplicationDetails/ApplicationDetailsContent/Permissions/PermissionsCard/ApplicationScopesAssignmentModal/use-organization-scopes-assignment.ts | :chart_with_upwards_trend: +1.33 KB |
| packages/console/src/pages/ApplicationDetails/ApplicationDetailsContent/Permissions/PermissionsCard/ApplicationScopesAssignmentModal/use-resource-scopes-assignment.ts | :chart_with_upwards_trend: +2.66 KB |
| packages/console/src/pages/ApplicationDetails/ApplicationDetailsContent/Permissions/PermissionsCard/ApplicationScopesAssignmentModal/use-user-scopes-assignment.ts | :chart_with_upwards_trend: +1.05 KB |
| packages/console/src/pages/ApplicationDetails/ApplicationDetailsContent/Permissions/PermissionsCard/ApplicationScopesManagementModal/index.tsx | :chart_with_upwards_trend: +4.42 KB |
| packages/console/src/pages/ApplicationDetails/ApplicationDetailsContent/Permissions/PermissionsCard/index.module.scss | :chart_with_upwards_trend: +441 Bytes |
| packages/console/src/pages/ApplicationDetails/ApplicationDetailsContent/Permissions/PermissionsCard/index.tsx | :chart_with_upwards_trend: +6.11 KB |
| packages/console/src/pages/ApplicationDetails/ApplicationDetailsContent/Permissions/PermissionsCard/use-scopes-table.tsx | :chart_with_upwards_trend: +6.54 KB |
| packages/console/src/pages/ApplicationDetails/ApplicationDetailsContent/Permissions/index.module.scss | :chart_with_upwards_trend: +305 Bytes |
| packages/console/src/pages/ApplicationDetails/ApplicationDetailsContent/Permissions/index.tsx | :chart_with_upwards_trend: +3.99 KB |
| packages/console/src/pages/ApplicationDetails/ApplicationDetailsContent/Permissions/use-scopes-table.tsx | :chart_with_upwards_trend: +5.25 KB |
| packages/phrases/src/locales/de/translation/admin-console/application-details.ts | :chart_with_upwards_trend: +776 Bytes |
| packages/phrases/src/locales/en/translation/admin-console/application-details.ts | :chart_with_upwards_trend: +608 Bytes |
| packages/phrases/src/locales/es/translation/admin-console/application-details.ts | :chart_with_upwards_trend: +776 Bytes |
| packages/phrases/src/locales/fr/translation/admin-console/application-details.ts | :chart_with_upwards_trend: +776 Bytes |
| packages/phrases/src/locales/it/translation/admin-console/application-details.ts | :chart_with_upwards_trend: +776 Bytes |
| packages/phrases/src/locales/ja/translation/admin-console/application-details.ts | :chart_with_upwards_trend: +776 Bytes |
| packages/phrases/src/locales/ko/translation/admin-console/application-details.ts | :chart_with_upwards_trend: +776 Bytes |
| packages/phrases/src/locales/pl-pl/translation/admin-console/application-details.ts | :chart_with_upwards_trend: +776 Bytes |
| packages/phrases/src/locales/pt-br/translation/admin-console/application-details.ts | :chart_with_upwards_trend: +776 Bytes |
| packages/phrases/src/locales/pt-pt/translation/admin-console/application-details.ts | :chart_with_upwards_trend: +776 Bytes |
| packages/phrases/src/locales/ru/translation/admin-console/application-details.ts | :chart_with_upwards_trend: +776 Bytes |
| packages/phrases/src/locales/tr-tr/translation/admin-console/application-details.ts | :chart_with_upwards_trend: +776 Bytes |
| packages/phrases/src/locales/zh-cn/translation/admin-console/application-details.ts | :chart_with_upwards_trend: +776 Bytes |
| packages/phrases/src/locales/zh-hk/translation/admin-console/application-details.ts | :chart_with_upwards_trend: +776 Bytes |
| packages/phrases/src/locales/zh-tw/translation/admin-console/application-details.ts | :chart_with_upwards_trend: +776 Bytes |