Skip to content

Commit d582374

Browse files
authored
fix: allow viewers to change or leave the org (#565)
Signed-off-by: Miguel Martinez Trivino <[email protected]>
1 parent 65fb815 commit d582374

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

app/controlplane/internal/authz/authz.go

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -183,10 +183,14 @@ var ServerOperationsMap = map[string][]*Policy{
183183
"/controlplane.v1.ContextService/Current": {PolicyOrganizationRead},
184184
// Listing, create or selecting an organization does not have any required permissions,
185185
// since all the permissions here are in the context of an organization
186-
"/controlplane.v1.OrganizationService/Create": {},
187-
"/controlplane.v1.OrganizationService/SetCurrentMembership": {},
186+
// Create new organization
187+
"/controlplane.v1.OrganizationService/Create": {},
188188
// NOTE: this is about listing my own memberships, not about listing all the memberships in the organization
189189
"/controlplane.v1.UserService/ListMemberships": {},
190+
// Set the current organization for the current user
191+
"/controlplane.v1.UserService/SetCurrentMembership": {},
192+
// Leave the organization
193+
"/controlplane.v1.UserService/DeleteMembership": {},
190194
}
191195

192196
type SubjectAPIToken struct {

0 commit comments

Comments
 (0)