MCPcopy Create free account
hub / github.com/bytebase/bytebase / policyContainsAllUsers

Function policyContainsAllUsers

backend/api/v1/user_service.go:971–980  ·  view source on GitHub ↗
(policy *storepb.IamPolicy)

Source from the content-addressed store, hash-verified

969}
970
971func policyContainsAllUsers(policy *storepb.IamPolicy) bool {
972 for _, binding := range policy.Bindings {
973 for _, member := range binding.Members {
974 if member == common.AllUsers {
975 return true
976 }
977 }
978 }
979 return false
980}
981
982func isUserWorkspaceAdmin(ctx context.Context, stores *store.Store, user *store.UserMessage, workspaceID string) (bool, error) {
983 workspacePolicy, err := stores.GetWorkspaceIamPolicy(ctx, workspaceID)

Callers 1

preAddUserGuardMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected