test: include per-org default roles in rbac user subjects - #26003
Merged
Conversation
Member
Author
This was referenced Jun 2, 2026
Emyrk
force-pushed
the
gateway-accounts/org-default-roles
branch
from
June 2, 2026 23:02
c5afc1c to
4d52fbe
Compare
Emyrk
force-pushed
the
gateway-accounts/test-subject-default-roles
branch
from
June 2, 2026 23:02
e0c052e to
bc9063b
Compare
Emyrk
force-pushed
the
gateway-accounts/org-default-roles
branch
from
June 2, 2026 23:19
4d52fbe to
286774c
Compare
Emyrk
force-pushed
the
gateway-accounts/test-subject-default-roles
branch
from
June 2, 2026 23:19
bc9063b to
f2aed83
Compare
Emyrk
force-pushed
the
gateway-accounts/org-default-roles
branch
from
June 2, 2026 23:28
286774c to
e6dfeb2
Compare
Emyrk
force-pushed
the
gateway-accounts/test-subject-default-roles
branch
from
June 2, 2026 23:28
f2aed83 to
71b14db
Compare
Emyrk
force-pushed
the
gateway-accounts/org-default-roles
branch
from
June 3, 2026 13:15
e6dfeb2 to
85045f1
Compare
Emyrk
force-pushed
the
gateway-accounts/test-subject-default-roles
branch
2 times, most recently
from
June 3, 2026 13:58
bdc563e to
dc2e810
Compare
Emyrk
force-pushed
the
gateway-accounts/org-default-roles
branch
from
June 3, 2026 13:58
85045f1 to
d15a3f0
Compare
Emyrk
force-pushed
the
gateway-accounts/test-subject-default-roles
branch
from
June 3, 2026 14:56
dc2e810 to
888096e
Compare
Emyrk
force-pushed
the
gateway-accounts/org-default-roles
branch
2 times, most recently
from
June 3, 2026 16:02
03fe290 to
9edae41
Compare
Emyrk
force-pushed
the
gateway-accounts/test-subject-default-roles
branch
from
June 3, 2026 16:02
888096e to
e18d560
Compare
Emyrk
force-pushed
the
gateway-accounts/test-subject-default-roles
branch
from
June 3, 2026 16:06
e18d560 to
b61e0b0
Compare
This was referenced Jun 3, 2026
Emyrk
force-pushed
the
gateway-accounts/org-default-roles
branch
from
June 3, 2026 20:48
9edae41 to
ad60bf1
Compare
Emyrk
force-pushed
the
gateway-accounts/test-subject-default-roles
branch
from
June 3, 2026 20:48
b61e0b0 to
3bf0cd9
Compare
Emyrk
force-pushed
the
gateway-accounts/org-default-roles
branch
from
June 3, 2026 21:09
ad60bf1 to
926baff
Compare
Emyrk
force-pushed
the
gateway-accounts/test-subject-default-roles
branch
from
June 3, 2026 21:09
3bf0cd9 to
4347bf4
Compare
Emyrk
force-pushed
the
gateway-accounts/org-default-roles
branch
from
June 3, 2026 21:23
926baff to
e25bccb
Compare
Emyrk
force-pushed
the
gateway-accounts/test-subject-default-roles
branch
from
June 3, 2026 21:23
4347bf4 to
e4356f7
Compare
Emyrk
force-pushed
the
gateway-accounts/org-default-roles
branch
from
June 3, 2026 21:43
e25bccb to
932db6e
Compare
Emyrk
force-pushed
the
gateway-accounts/test-subject-default-roles
branch
2 times, most recently
from
June 3, 2026 21:56
00b5c1f to
0988f35
Compare
Emyrk
force-pushed
the
gateway-accounts/org-default-roles
branch
from
June 3, 2026 22:14
7702c39 to
b96becd
Compare
Emyrk
force-pushed
the
gateway-accounts/test-subject-default-roles
branch
from
June 3, 2026 22:14
0988f35 to
27102b3
Compare
Emyrk
force-pushed
the
gateway-accounts/org-default-roles
branch
from
June 3, 2026 22:20
b96becd to
56ddb69
Compare
Emyrk
force-pushed
the
gateway-accounts/test-subject-default-roles
branch
from
June 3, 2026 22:20
27102b3 to
e3705f7
Compare
Emyrk
marked this pull request as ready for review
June 3, 2026 22:24
Emyrk
force-pushed
the
gateway-accounts/test-subject-default-roles
branch
from
June 3, 2026 22:29
e3705f7 to
6c14675
Compare
Emyrk
force-pushed
the
gateway-accounts/org-default-roles
branch
from
June 3, 2026 22:29
56ddb69 to
dce59fb
Compare
Emyrk
force-pushed
the
gateway-accounts/test-subject-default-roles
branch
from
June 5, 2026 14:19
6c14675 to
5f27760
Compare
Emyrk
force-pushed
the
gateway-accounts/org-default-roles
branch
2 times, most recently
from
June 5, 2026 15:32
662646e to
16724f9
Compare
Emyrk
force-pushed
the
gateway-accounts/test-subject-default-roles
branch
from
June 5, 2026 15:32
5f27760 to
bca7a5d
Compare
geokat
approved these changes
Jun 5, 2026
Emyrk
force-pushed
the
gateway-accounts/test-subject-default-roles
branch
from
June 5, 2026 18:59
bca7a5d to
c76dc3f
Compare
Emyrk
force-pushed
the
gateway-accounts/org-default-roles
branch
from
June 5, 2026 19:20
ed135cf to
0474e9f
Compare
Emyrk
force-pushed
the
gateway-accounts/test-subject-default-roles
branch
from
June 5, 2026 19:20
c76dc3f to
71515b0
Compare
Emyrk
changed the base branch from
gateway-accounts/org-default-roles
to
graphite-base/26003
June 5, 2026 19:33
Emyrk
force-pushed
the
graphite-base/26003
branch
from
June 5, 2026 19:33
0474e9f to
938c208
Compare
Emyrk
force-pushed
the
gateway-accounts/test-subject-default-roles
branch
from
June 5, 2026 19:33
71515b0 to
8f093d5
Compare
Aligns coderdtest.AuthzUserSubjectWithDB with GetAuthorizationUserRoles so tests built via this helper see the per-org default_org_member_roles union, not just organization-member. Also moves the single-use MemberSubject helper into its sole consumer and unexports it. Refs #25936.
Emyrk
force-pushed
the
gateway-accounts/test-subject-default-roles
branch
from
June 5, 2026 19:34
8f093d5 to
92e48cc
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

Just fixing tests
Refs #25936. Stacks on #25994.
Aligns the
coderdtestuser subject helper with production so per-org default member roles surface in tests.AuthzUserSubjectWithDBunionsorganizations.default_org_member_rolesinto the subject's roles, matchingGetAuthorizationUserRoles.organization-memberonly and silently masks regressions on permissions granted via the union.MemberSubjectmoves out ofcoderdtest/subjects.gointo its sole consumer and unexports.coderd/coderdtest/subjects.gois deleted.Implementation notes
testutil/websocket.goswaps its example doc to a genericmySubjectplaceholder sinceMemberSubjectis no longer importable.Coder Agents on behalf of @Emyrk.