@@ -62,6 +62,13 @@ const ( |
| 62 | const ( | 62 | const ( |
| 63 | ActionStarCreate Action = "star:create" | 63 | ActionStarCreate Action = "star:create" |
| 64 | ActionForkCreate Action = "fork:create" | 64 | ActionForkCreate Action = "fork:create" |
| | 65 | + |
| | 66 | + // S26 social actions. WatchSet covers both setting an explicit |
| | 67 | + // level and unsetting (deleting the row). Both require a logged-in |
| | 68 | + // user with read access to the repo — the policy.Can engine |
| | 69 | + // enforces visibility before reaching the role check, so a |
| | 70 | + // non-collab on a private repo deny-leaks as 404. |
| | 71 | + ActionWatchSet Action = "watch:set" |
| 65 | ) | 72 | ) |
| 66 | | 73 | |
| 67 | // AllActions is the canonical list. The matrix test iterates this so a | 74 | // AllActions is the canonical list. The matrix test iterates this so a |
@@ -74,6 +81,7 @@ var AllActions = []Action{ |
| 74 | ActionIssueRead, ActionIssueCreate, ActionIssueComment, ActionIssueClose, ActionIssueLabel, ActionIssueAssign, | 81 | ActionIssueRead, ActionIssueCreate, ActionIssueComment, ActionIssueClose, ActionIssueLabel, ActionIssueAssign, |
| 75 | ActionPullRead, ActionPullCreate, ActionPullMerge, ActionPullReview, ActionPullClose, | 82 | ActionPullRead, ActionPullCreate, ActionPullMerge, ActionPullReview, ActionPullClose, |
| 76 | ActionStarCreate, ActionForkCreate, | 83 | ActionStarCreate, ActionForkCreate, |
| | 84 | + ActionWatchSet, |
| 77 | } | 85 | } |
| 78 | | 86 | |
| 79 | // isWriteAction returns true when the action mutates state. Used by the | 87 | // isWriteAction returns true when the action mutates state. Used by the |