Skip to content

feat(console): add app access control rules tab#8899

Merged
charIeszhao merged 1 commit into
masterfrom
charles-log-13488-build-console-rules-tab-and-access-control-card
Jun 2, 2026
Merged

feat(console): add app access control rules tab#8899
charIeszhao merged 1 commit into
masterfrom
charles-log-13488-build-console-rules-tab-and-access-control-card

Conversation

@charIeszhao
Copy link
Copy Markdown
Member

Summary

Add a Rules tab to application details for configuring app-level access control. The tab shows the access-control switch from application details, loads the rule config only when the tab is active, and displays rule rows for users, user roles, organizations, and organization roles.

Testing

Unit tests

Checklist

  • .changeset
  • unit tests
  • integration tests
  • necessary TSDoc comments

Copilot AI review requested due to automatic review settings May 28, 2026 14:12
@github-actions github-actions Bot added the feature Cool stuff label May 28, 2026
@github-actions
Copy link
Copy Markdown

github-actions Bot commented May 28, 2026

COMPARE TO master

Total Size Diff ⚠️ 📈 +43.04 KB

Diff by File
Name Diff
packages/console/src/consts/page-tabs.ts 📈 +19 Bytes
packages/console/src/pages/ApplicationDetails/ApplicationDetailsContent/ApplicationAccessControl/index.module.scss 📈 +1.08 KB
packages/console/src/pages/ApplicationDetails/ApplicationDetailsContent/ApplicationAccessControl/index.tsx 📈 +6.29 KB
packages/console/src/pages/ApplicationDetails/ApplicationDetailsContent/ApplicationAccessControl/utils.test.ts 📈 +1.02 KB
packages/console/src/pages/ApplicationDetails/ApplicationDetailsContent/ApplicationAccessControl/utils.ts 📈 +629 Bytes
packages/console/src/pages/ApplicationDetails/ApplicationDetailsContent/MachineToMachineTabs.tsx 📈 +1.83 KB
packages/console/src/pages/ApplicationDetails/ApplicationDetailsContent/index.tsx 📈 +710 Bytes
packages/phrases/src/locales/ar/translation/admin-console/application-details.ts 📈 +2.37 KB
packages/phrases/src/locales/de/translation/admin-console/application-details.ts 📈 +1.83 KB
packages/phrases/src/locales/en/translation/admin-console/application-details.ts 📈 +1.48 KB
packages/phrases/src/locales/es/translation/admin-console/application-details.ts 📈 +1.88 KB
packages/phrases/src/locales/fr/translation/admin-console/application-details.ts 📈 +2 KB
packages/phrases/src/locales/it/translation/admin-console/application-details.ts 📈 +1.79 KB
packages/phrases/src/locales/ja/translation/admin-console/application-details.ts 📈 +2.1 KB
packages/phrases/src/locales/ko/translation/admin-console/application-details.ts 📈 +1.8 KB
packages/phrases/src/locales/pl-pl/translation/admin-console/application-details.ts 📈 +1.9 KB
packages/phrases/src/locales/pt-br/translation/admin-console/application-details.ts 📈 +1.79 KB
packages/phrases/src/locales/pt-pt/translation/admin-console/application-details.ts 📈 +1.89 KB
packages/phrases/src/locales/ru/translation/admin-console/application-details.ts 📈 +2.8 KB
packages/phrases/src/locales/th/translation/admin-console/application-details.ts 📈 +3.07 KB
packages/phrases/src/locales/tr-tr/translation/admin-console/application-details.ts 📈 +1.76 KB
packages/phrases/src/locales/zh-cn/translation/admin-console/application-details.ts 📈 +1.42 KB
packages/phrases/src/locales/zh-hk/translation/admin-console/application-details.ts 📈 +1.48 KB
packages/phrases/src/locales/zh-tw/translation/admin-console/application-details.ts 📈 +1.51 KB

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds an App-level access control “Rules” tab to the Application Details page (behind isDevFeaturesEnabled), including localized copy and a new UI section that lazily loads and summarizes configured rule counts.

Changes:

  • Add ApplicationDetailsTabs.Rules and render a new “Rules” tab (non–machine-to-machine apps, dev features only).
  • Introduce ApplicationAccessControl UI that fetches GET /applications/:id/access-control only when the tab is active and displays rule counters + enable switch.
  • Refactor machine-to-machine tab content into a dedicated MachineToMachineTabs component.

Reviewed changes

Copilot reviewed 11 out of 11 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
packages/phrases/src/locales/en/translation/admin-console/application-details.ts Adds English i18n strings for the new access control tab/section.
packages/phrases/src/locales/zh-cn/translation/admin-console/application-details.ts Adds Simplified Chinese i18n strings for access control UI.
packages/phrases/src/locales/zh-hk/translation/admin-console/application-details.ts Adds Traditional Chinese (HK) i18n strings for access control UI.
packages/phrases/src/locales/zh-tw/translation/admin-console/application-details.ts Adds Traditional Chinese (TW) i18n strings for access control UI.
packages/console/src/consts/page-tabs.ts Adds Rules to ApplicationDetailsTabs.
packages/console/src/pages/ApplicationDetails/ApplicationDetailsContent/index.tsx Wires the “Rules” tab + content; extracts M2M tab content into a separate component.
packages/console/src/pages/ApplicationDetails/ApplicationDetailsContent/MachineToMachineTabs.tsx New component encapsulating M2M-specific tab panels.
packages/console/src/pages/ApplicationDetails/ApplicationDetailsContent/ApplicationAccessControl/index.tsx New access control tab content: enable switch, SWR fetch, notifications, and rule rows.
packages/console/src/pages/ApplicationDetails/ApplicationDetailsContent/ApplicationAccessControl/index.module.scss Styles for access control tab UI.
packages/console/src/pages/ApplicationDetails/ApplicationDetailsContent/ApplicationAccessControl/utils.ts Adds helpers for determining whether rules exist + counting org-role rules.
packages/console/src/pages/ApplicationDetails/ApplicationDetailsContent/ApplicationAccessControl/utils.test.ts Unit tests for the new access control helpers.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Copy link
Copy Markdown
Contributor

@xiaoyijun xiaoyijun left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Copy link
Copy Markdown
Contributor

@wangsijie wangsijie left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Overall LGTM, you can translate all locales

@charIeszhao charIeszhao force-pushed the charles-log-13488-build-console-rules-tab-and-access-control-card branch from ad698bc to bfe821c Compare June 2, 2026 07:50
@github-actions github-actions Bot added size/xl and removed size/xl labels Jun 2, 2026
Copilot AI review requested due to automatic review settings June 2, 2026 08:10
@charIeszhao charIeszhao force-pushed the charles-log-13488-build-console-rules-tab-and-access-control-card branch from bfe821c to 08da617 Compare June 2, 2026 08:10
@github-actions github-actions Bot added size/xl and removed size/xl labels Jun 2, 2026
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 24 out of 24 changed files in this pull request and generated 2 comments.

@charIeszhao charIeszhao enabled auto-merge (squash) June 2, 2026 08:18
@charIeszhao charIeszhao merged commit 4e84080 into master Jun 2, 2026
36 checks passed
@charIeszhao charIeszhao deleted the charles-log-13488-build-console-rules-tab-and-access-control-card branch June 2, 2026 08:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Development

Successfully merging this pull request may close these issues.

4 participants