Honor per-project grants on private projects (M-14) #117
No reviewers
Labels
No labels
Compat/Breaking
Kind/Bug
Kind/Documentation
Kind/Enhancement
Kind/Feature
Kind/Security
Kind/Testing
Priority
Critical
Priority
High
Priority
Low
Priority
Medium
Reviewed
Confirmed
Reviewed
Duplicate
Reviewed
Invalid
Reviewed
Won't Fix
Status
Abandoned
Status
Blocked
Status
Need More Info
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
qwc-open/asiakirjat!117
Loading…
Reference in a new issue
No description provided.
Delete branch "fix/private-honors-per-project-grant"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Summary
Service.Createalready auto-grants a non-admin creator editor access on every non-public project (internal/projects/service.go:105-116). Onprivate(the default visibility), that grant was dead weight:CanViewandFilterAccessibleonly consultedGlobalAccess.CanViewforprivatenow also accepts a non-emptyProjectAccess.GetEffectiveRole;FilterAccessibleforprivateincludes the project when the user has a global grant or is in the per-project access map.customsemantics are unchanged — no global-access fast path, so it stays strictly more restrictive thanprivate. Per-project grants on private are additive (useful for letting one outside user into one project without org-wide access).roles-permissions.md,first-project.md) updated to describe the new model.Test plan
internal/access/checker_test.go: the pre-#95 pin inTestCanViewis flipped;TestFilterAccessiblegets a new private+per-project case.go test ./...— full suite green.go build— clean.🤖 Generated with Claude Code