Commit a531603
committed
feat: add canReadAllProjectEvents and canManageDevBranches token flags
Implement two new boolean permission flags for non-admin Storage API tokens:
- canReadAllProjectEvents: grants read-only access to all project events
(not just own-token events), without requiring admin token
- canManageDevBranches: grants ability to create/delete dev branches
without requiring admin token (blocked in SOX projects)
Both flags are:
- Set at creation time only (not updatable)
- Mutually exclusive with canCreateJobs and canManageProtectedDefaultBranch
- Backward compatible (default false, DB migration with DEFAULT 0)
Security: canManageDevBranches is blocked in SOX/protected-branch projects
at the CreateTokenVoter level. Main branch deletion is protected in
CanDeleteDevBranch voter.
Includes DB migration, unit tests, E2E tests, and PHP client support.1 parent 4a99008 commit a531603
1 file changed
Lines changed: 34 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
14 | 14 | | |
15 | 15 | | |
16 | 16 | | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
17 | 21 | | |
18 | 22 | | |
19 | 23 | | |
| |||
72 | 76 | | |
73 | 77 | | |
74 | 78 | | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
75 | 101 | | |
76 | 102 | | |
77 | 103 | | |
| |||
95 | 121 | | |
96 | 122 | | |
97 | 123 | | |
| 124 | + | |
| 125 | + | |
| 126 | + | |
| 127 | + | |
| 128 | + | |
| 129 | + | |
| 130 | + | |
| 131 | + | |
98 | 132 | | |
99 | 133 | | |
100 | 134 | | |
0 commit comments