@@ -158,8 +158,10 @@ var (
158158 PolicyWorkflowDelete = & Policy {ResourceWorkflow , ActionDelete }
159159 // Projects
160160 PolicyProjectCreate = & Policy {ResourceProject , ActionCreate }
161+
161162 // User Membership
162- PolicyOrganizationRead = & Policy {Organization , ActionRead }
163+ PolicyOrganizationRead = & Policy {Organization , ActionRead }
164+ PolicyOrganizationListMemberships = & Policy {OrganizationMemberships , ActionList }
163165
164166 // Group Memberships
165167 PolicyGroupListPendingInvitations = & Policy {ResourceGroup , ActionList }
@@ -215,6 +217,9 @@ var RolesMap = map[Role][]*Policy{
215217 PolicyWorkflowRead ,
216218 // Organization
217219 PolicyOrganizationRead ,
220+
221+ // List organization memberships
222+ PolicyOrganizationListMemberships ,
218223 },
219224 // RoleAdmin is an org-scoped role that provides super admin privileges (it's the higher role)
220225 RoleAdmin : {
@@ -385,6 +390,10 @@ var ServerOperationsMap = map[string][]*Policy{
385390 // since all the permissions here are in the context of an organization
386391 // Create new organization
387392 "/controlplane.v1.OrganizationService/Create" : {},
393+
394+ // List global memberships
395+ "/controlplane.v1.OrganizationService/ListMemberships" : {PolicyOrganizationListMemberships },
396+
388397 // NOTE: this is about listing my own memberships, not about listing all the memberships in the organization
389398 "/controlplane.v1.UserService/ListMemberships" : {},
390399 // Set the current organization for the current user
0 commit comments