fix authorized_collections_action not returning for host-catalog (#5899)
This commit is contained in:
1 parent
bf5d2b3d5b
commit
610aa340fc
2 files changed
+12
-2
No files matched your search
@@ -516,7 +516,17 @@ func TestGrants_ReadActions(t *testing.T) {
|
||||
user, account := iam.TestUserManagedGroupGrantsFunc(t, conn, kmsCache, globals.GlobalPrefix, ldap.TestAuthMethodWithAccountInManagedGroup, []iam.TestRoleGrantsRequest{
|
||||
{
|
||||
RoleScopeId: globals.GlobalPrefix,
|
||||
Grants: []string{"ids=*;type=*;actions=*"},
|
||||
Grants: []string{"ids=*;type=host-catalog;actions=*"},
|
||||
GrantScopes: []string{globals.GrantScopeThis, globals.GrantScopeDescendants},
|
||||
},
|
||||
{
|
||||
RoleScopeId: globals.GlobalPrefix,
|
||||
Grants: []string{"ids=*;type=host;actions=*"},
|
||||
GrantScopes: []string{globals.GrantScopeThis, globals.GrantScopeDescendants},
|
||||
},
|
||||
{
|
||||
RoleScopeId: globals.GlobalPrefix,
|
||||
Grants: []string{"ids=*;type=host-set;actions=*"},
|
||||
GrantScopes: []string{globals.GrantScopeThis, globals.GrantScopeDescendants},
|
||||
},
|
||||
})()
|
||||
|
||||
@@ -701,7 +701,7 @@ func (s Service) authResult(ctx context.Context, id string, a action.Type, isRec
|
||||
res := auth.VerifyResults{}
|
||||
|
||||
var parentId string
|
||||
opts := []auth.Option{auth.WithAction(a), auth.WithRecursive(isRecursive)}
|
||||
opts := []auth.Option{auth.WithAction(a), auth.WithRecursive(isRecursive), auth.WithFetchAdditionalResourceGrants(additionalResourceGrants...)}
|
||||
switch a {
|
||||
case action.List, action.Create:
|
||||
parentId = id
|
||||
|
||||
Reference in new issue
Block a user