-
-
Notifications
You must be signed in to change notification settings - Fork 18
Backend ceadr refactoring #1680
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
b2c17c1
e03bf6d
e9dde41
606c407
34a494e
8f2044d
0d43b88
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
|
@@ -79,6 +79,10 @@ export function parseCedarPolicyToClassicalPermissions( | |||||||||||||
| } | ||||||||||||||
|
|
||||||||||||||
| result.tables = Array.from(tableMap.values()); | ||||||||||||||
| for (const table of result.tables) { | ||||||||||||||
| const a = table.accessLevel; | ||||||||||||||
|
||||||||||||||
| const a = table.accessLevel; | |
| const a = table.accessLevel; | |
| // Ensure visibility matches any allowed table action, in parity with CedarPermissionsService | |
| if (!a.visibility && (a.add || a.edit || a.delete)) { | |
| a.visibility = true; | |
| } |
Copilot
AI
Mar 20, 2026
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The new post-processing loop uses a non-descriptive variable name a for table.accessLevel, which makes the logic harder to read/maintain. Consider renaming it to something explicit like access/accessLevel to match surrounding conventions.
| const a = table.accessLevel; | |
| a.readonly = a.visibility && !a.add && !a.edit && !a.delete; | |
| const accessLevel = table.accessLevel; | |
| accessLevel.readonly = | |
| accessLevel.visibility && !accessLevel.add && !accessLevel.edit && !accessLevel.delete; |
This file was deleted.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
saveCedarPolicyno longer callssyncClassicalPermissions, which means any features still queryinggroup.permissions/PermissionEntitywill become stale or stop working after a Cedar policy update. For example,groupRepository.findAllUsersInGroupsWhereUserIsAdmin(used in table log filtering) currently checksgroup.permissionsforPermissionTypeEnum.Group+AccessLevelEnum.edit. If the intent is to fully deprecate classical permissions, those remaining queries should be migrated to Cedar evaluation before removing synchronization.