Skip to content

refactor: standardize permission layers#5094

Open
peterhaochen47 wants to merge 1 commit intocloudfoundry:mainfrom
peterhaochen47:pr/main/refactor-standardize-perm-layers-may26
Open

refactor: standardize permission layers#5094
peterhaochen47 wants to merge 1 commit intocloudfoundry:mainfrom
peterhaochen47:pr/main/refactor-standardize-perm-layers-may26

Conversation

@peterhaochen47
Copy link
Copy Markdown
Member

  • such that the codepaths involved become more aligned with the
    following layer design/abstraction:
| Layer | Responsibility |
|-------|---------------|
| **Controller** | Asks `Permissions` (via `permission_queryer`) what the current user can see/do |
| **Permissions** | Translates "can user do X?" into role-set queries via `Membership` |
| **Membership** | Executes role-based database queries (which orgs/spaces does user belong to?) |
| **Models** | Data access, no RBAC logic |
  • I have reviewed the contributing guide

  • I have viewed, signed, and submitted the Contributor License Agreement

  • I have made this pull request to the main branch

  • I have run all the unit tests using bundle exec rake

  • I have run CF Acceptance Tests

- such that the codepaths
involved become more aligned with the
following layer design/abstraction:
```
| Layer | Responsibility |
|-------|---------------|
| **Controller** | Asks `Permissions` (via `permission_queryer`) what the current user can see/do |
| **Permissions** | Translates "can user do X?" into role-set queries via `Membership` |
| **Membership** | Executes role-based database queries (which orgs/spaces does user belong to?) |
| **Models** | Data access, no RBAC logic |
```
@peterhaochen47 peterhaochen47 force-pushed the pr/main/refactor-standardize-perm-layers-may26 branch from 2ecd3ff to 672db0d Compare May 7, 2026 21:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant