mirror of
https://github.com/coder/coder.git
synced 2026-09-24 15:04:27 +08:00
feat(coderd/rbac): make organization-member a per-org system custom role (#21359)
Migrated the built-in organization-member role to DB storage so it can be customized per org. Closes https://github.com/coder/internal/issues/1073 (part 1)
This commit is contained in:
@@ -307,13 +307,13 @@ func TestExternalAuthManagement(t *testing.T) {
|
||||
gitlab.ExternalLogin(t, client)
|
||||
|
||||
links, err := db.GetExternalAuthLinksByUserID(
|
||||
dbauthz.As(ctx, coderdtest.AuthzUserSubject(user, ownerUser.OrganizationID)), user.ID)
|
||||
dbauthz.As(ctx, coderdtest.AuthzUserSubject(user)), user.ID)
|
||||
require.NoError(t, err)
|
||||
require.Len(t, links, 2)
|
||||
|
||||
// Expire the links
|
||||
for _, l := range links {
|
||||
_, err := db.UpdateExternalAuthLink(dbauthz.As(ctx, coderdtest.AuthzUserSubject(user, ownerUser.OrganizationID)), database.UpdateExternalAuthLinkParams{
|
||||
_, err := db.UpdateExternalAuthLink(dbauthz.As(ctx, coderdtest.AuthzUserSubject(user)), database.UpdateExternalAuthLinkParams{
|
||||
ProviderID: l.ProviderID,
|
||||
UserID: l.UserID,
|
||||
UpdatedAt: dbtime.Now(),
|
||||
|
||||
Reference in New Issue
Block a user