Skip to content

Commit ac1db4f

Browse files
craig[bot]souravcrl
andcommitted
Merge #150302
150302: sql: restrict admin inheritance for specific role options r=souravcrl a=souravcrl Certain role options SUBJECT and NOVIEWACTIVITY (and others) should be excluded from inheritance by the admin roles in line with the comment here. https://reviewable.io/reviews/cockroachdb/cockroach/149463#-OUenA-O4wYwadhkcBdW We have already excluded the PROVISIONSRC option in the PR #149463 and would be extending that list. fixes #150300 Epic None Release note: None Co-authored-by: souravcrl <[email protected]>
2 parents 7f2055b + b95dae2 commit ac1db4f

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

pkg/sql/roleoption/role_option.go

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,20 @@ const (
8181
PROVISIONSRC
8282
)
8383

84+
// NonAdminInheritedOptions contains the role options that are not implicitly
85+
// applied to all admin roles.
8486
var NonAdminInheritedOptions = []Option{
87+
NOCREATEROLE,
88+
NOCONTROLJOB,
89+
NOCREATEDB,
90+
NOVIEWACTIVITY,
91+
NOCANCELQUERY,
92+
NOMODIFYCLUSTERSETTING,
93+
NOVIEWACTIVITYREDACTED,
94+
NOREPLICATION,
95+
NOVIEWCLUSTERSETTING,
96+
SUBJECT,
97+
NOBYPASSRLS,
8598
PROVISIONSRC,
8699
}
87100

0 commit comments

Comments
 (0)