AuthN: Introduce DefaultOrgID function for managed service accounts (#93432)
* Managed Service Accounts: Use AutoAssignOrgID * Fix the IsExternalServiceAccount function * Reassign service account role * Account for AutoAssignOrg * Update pkg/services/serviceaccounts/models.go * Simplify IsExternalServiceAccount function * Add tests * Easier to understand test * Revert small change
This commit is contained in:
@@ -103,10 +103,10 @@ func TestAccessControlStore_SaveExternalServiceRole(t *testing.T) {
|
||||
{
|
||||
cmd: accesscontrol.SaveExternalServiceRoleCommand{
|
||||
ExternalServiceID: "app1",
|
||||
AssignmentOrgID: 1,
|
||||
AssignmentOrgID: 2,
|
||||
ServiceAccountID: 2,
|
||||
},
|
||||
wantErr: true,
|
||||
wantErr: false,
|
||||
},
|
||||
},
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user