mirror of
https://github.com/coder/coder.git
synced 2026-09-24 15:04:27 +08:00
feat(coderd): gate org-member workspace elevation behind experiment (#26027)
Gates the workspace-ops elevation on `organization-member` and `organization-service-account` behind the `minimum-implicit-member` experiment.
This commit is contained in:
@@ -267,3 +267,16 @@ func SetChatACLDisabled(v bool) {
|
||||
func ChatACLDisabled() bool {
|
||||
return chatACLDisabled.Load()
|
||||
}
|
||||
|
||||
// minimumImplicitMember mirrors RoleOptions.MinimumImplicitMember.
|
||||
// Stored as a global because OrgMemberPermissions and
|
||||
// OrgServiceAccountPermissions are called from rolestore without
|
||||
// access to api instance state.
|
||||
var minimumImplicitMember atomic.Bool
|
||||
|
||||
// MinimumImplicitMember reports whether the workspace-ops elevation
|
||||
// has been stripped from organization-member and
|
||||
// organization-service-account. See RoleOptions.MinimumImplicitMember.
|
||||
func MinimumImplicitMember() bool {
|
||||
return minimumImplicitMember.Load()
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user