Skip to content

Commit

Permalink
Remove unused RBACs in GraphQL server
Browse files Browse the repository at this point in the history
Signed-off-by: punithnayak <[email protected]>
  • Loading branch information
punithnayak committed Aug 24, 2023
1 parent b1ea056 commit 3a4e551
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions chaoscenter/graphql/server/pkg/authorization/roles.go
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,11 @@ const (
DeleteEnvironment RoleQuery = "DeleteEnvironment"
GetEnvironment RoleQuery = "GetEnvironment"
ListEnvironments RoleQuery = "ListEnvironments"
AddProbe RoleQuery = "AddProbe"
DeleteProbe RoleQuery = "DeleteProbe"
UpdateProbe RoleQuery = "UpdateProbe"
GetProbe RoleQuery = "GetProbe"
ListProbes RoleQuery = "ListProbes"
MemberRoleOwnerString = string(model.MemberRoleOwner)
MemberRoleEditorString = string(model.MemberRoleEditor)
MemberRoleViewerString = string(model.MemberRoleViewer)
Expand Down Expand Up @@ -80,4 +85,8 @@ var MutationRbacRules = map[RoleQuery][]string{
DeleteEnvironment: {MemberRoleOwnerString, MemberRoleEditorString},
GetEnvironment: {MemberRoleOwnerString, MemberRoleEditorString, MemberRoleViewerString},
ListEnvironments: {MemberRoleOwnerString, MemberRoleEditorString, MemberRoleViewerString},
AddProbe: {MemberRoleOwnerString, MemberRoleEditorString},
UpdateProbe: {MemberRoleOwnerString, MemberRoleEditorString},
GetProbe: {MemberRoleOwnerString, MemberRoleEditorString, MemberRoleViewerString},
ListProbes: {MemberRoleOwnerString, MemberRoleEditorString, MemberRoleViewerString},
}

0 comments on commit 3a4e551

Please sign in to comment.