...
Code Block |
---|
/** * QuerySelector returns granted domain, or account or resources for caller. */ public interface QuerySelector extends Adapter { ... /** * List granted domains for the caller, given a specific entity type. * * @param caller account to check against. * @param entityType entity type * @param accessType access type * @return list of domain Ids granted to the caller account. */ List<Long> getAuthorizedDomains(Account caller, String entityType, AccessType accessType); /** * List granted accounts for the caller, given a specific entity type. * * @param caller account to check against. * @param entityType entity type * @param accessType access type * @return list of account Ids granted to the caller account. */ List<Long> getAuthorizedAccounts(Account caller, String entityType, AccessType accessType); /** * List granted resources for the caller, given a specific entity type. * * @param caller account to check against. * @param entityType entity type * @param accessType access type * @return list of resource Ids granted to the caller account. */ List<Long> getAuthorizedResources(Account caller, String entityType, AccessType accessType); /** * Check if this account is associated with a policy with scope of ALL * @param caller account to check * @param action action. * @param accessType access type * @return true if this account is attached with a policy for the given action of ALL scope. */ boolean isGrantedAll(Account caller, String action, AccessType accessType); /** * List of IAM group the given account belongs to * @param accountId account id. * @return IAM group names */ List<String> listIAMGroupsByAccount(long accountId); |
...