@Override public boolean hasRole(String roleName, CommandContext context) { return context.getAllowedDataPolicies().containsKey(roleName); }
@Override public boolean hasRole(String roleName, CommandContext context) { return context.getAllowedDataPolicies().containsKey(roleName); }
@Override public boolean hasRole(String roleName, CommandContext context) { return context.getAllowedDataPolicies().containsKey(roleName); }
return Collections.emptySet(); Collection<DataPolicy> policies = commandContext.getAllowedDataPolicies().values(); int policyCount = policies.size(); boolean[] exclude = new boolean[policyCount];
return Collections.emptySet(); Collection<DataPolicy> policies = commandContext.getAllowedDataPolicies().values(); int policyCount = policies.size(); boolean[] exclude = new boolean[policyCount];
return Collections.emptySet(); Collection<DataPolicy> policies = commandContext.getAllowedDataPolicies().values(); int policyCount = policies.size(); boolean[] exclude = new boolean[policyCount];
@Override public boolean isTempAccessible(PermissionType action, String resource, Context context, CommandContext commandContext) { if (resource != null) { return getInaccessibleResources(action, new HashSet<String>(Arrays.asList(resource)), context, commandContext).isEmpty(); } Boolean result = null; for(DataPolicy p:commandContext.getAllowedDataPolicies().values()) { DataPolicyMetadata policy = (DataPolicyMetadata)p; if (policy.isGrantAll()) { return true; } if (policy.isAllowCreateTemporaryTables() != null) { if (policy.isAllowCreateTemporaryTables()) { return true; } result = policy.isAllowCreateTemporaryTables(); } } if (result != null) { return result; } return allowCreateTemporaryTablesByDefault; }
@Override public boolean isTempAccessible(PermissionType action, String resource, Context context, CommandContext commandContext) { if (resource != null) { return getInaccessibleResources(action, new HashSet<String>(Arrays.asList(resource)), context, commandContext).isEmpty(); } Boolean result = null; for(DataPolicy p:commandContext.getAllowedDataPolicies().values()) { DataPolicyMetadata policy = (DataPolicyMetadata)p; if (policy.isGrantAll()) { return true; } if (policy.isAllowCreateTemporaryTables() != null) { if (policy.isAllowCreateTemporaryTables()) { return true; } result = policy.isAllowCreateTemporaryTables(); } } if (result != null) { return result; } return allowCreateTemporaryTablesByDefault; }
@Override public boolean isTempAccessible(PermissionType action, String resource, Context context, CommandContext commandContext) { if (resource != null) { return getInaccessibleResources(action, new HashSet<String>(Arrays.asList(resource)), context, commandContext).isEmpty(); } Boolean result = null; for(DataPolicy p:commandContext.getAllowedDataPolicies().values()) { DataPolicyMetadata policy = (DataPolicyMetadata)p; if (policy.isGrantAll()) { return true; } if (policy.isAllowCreateTemporaryTables() != null) { if (policy.isAllowCreateTemporaryTables()) { return true; } result = policy.isAllowCreateTemporaryTables(); } } if (result != null) { return result; } return allowCreateTemporaryTablesByDefault; }