Repository navigation
feat(platform-admin): add super-admin/support roles - #1540
Merged
Merged
Conversation
Read administrator authorization directly from the database and collapse bootstrap promotion into one upsert.
hello-jackytruong
referenced
this pull request
in hello-jackytruong/ChatWorkAI
Nov 22, 2026
* feat(platform-admin): cache authorization lookups * perf(database): simplify platform admin cache invalidation * feat(platform-admin): add role-based access * refactor(platform-admin): remove stale administrator roles Read administrator authorization directly from the database and collapse bootstrap promotion into one upsert.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
super-adminandsupport; onlysuper-admincan add or remove administrators.zoddependency fixes inintegrations/google-calendarandpackages/events.Why authorization stays uncached
Revoking or changing a platform administrator must take effect on the next request. Authorization therefore reads the persisted
PlatformAdminrow directly, avoiding a stale cache window or invalidation dependency.Changes
read-onlyrole from the schema-derived UI and every locale.Validation
pnpm lintpnpm --filter @chatbotx.io/database check-typespnpm --filter @chatbotx.io/business check-typespnpm --filter builder check-typespnpm --filter @chatbotx.io/database test -- __tests__/platform-admin-repository.test.tspnpm --filter @chatbotx.io/business test -- __tests__/platform-admin.service.test.ts __tests__/is-super-admin.test.ts __tests__/platform-admin-bootstrap.test.tsRelates to #1540