public AuthenticatedUser(String name) { this.name = name; this.role = RoleResource.role(name); }
public AuthenticatedUser(String name) { this.name = name; this.role = RoleResource.role(name); }
public RoleResource apply(UntypedResultSet.Row row) { return RoleResource.role(row.getString("role")); } });
public DropRoleStatement(RoleName name, boolean ifExists) { this.role = RoleResource.role(name.getName()); this.ifExists = ifExists; }
public AlterRoleStatement(RoleName name, RoleOptions opts) { this.role = RoleResource.role(name.getName()); this.opts = opts; }
protected PermissionsManagementStatement(Set<Permission> permissions, IResource resource, RoleName grantee) { this.permissions = permissions; this.resource = resource; this.grantee = RoleResource.role(grantee.getName()); }
protected PermissionsManagementStatement(Set<Permission> permissions, IResource resource, RoleName grantee) { this.permissions = permissions; this.resource = resource; this.grantee = RoleResource.role(grantee.getName()); }
public RoleResource apply(UntypedResultSet.Row row) { return RoleResource.role(row.getString("role")); } });
public CreateRoleStatement(RoleName name, RoleOptions options, boolean ifNotExists) { this.role = RoleResource.role(name.getName()); this.opts = options; this.ifNotExists = ifNotExists; }
public CreateRoleStatement(RoleName name, RoleOptions options, boolean ifNotExists) { this.role = RoleResource.role(name.getName()); this.opts = options; this.ifNotExists = ifNotExists; }
public RoleResource apply(UntypedResultSet.Row row) { return RoleResource.role(row.getString("role")); } });
public ListPermissionsStatement(Set<Permission> permissions, IResource resource, RoleName grantee, boolean recursive) { this.permissions = permissions; this.resource = resource; this.recursive = recursive; this.grantee = grantee.hasName()? RoleResource.role(grantee.getName()) : null; }
public ListRolesStatement(RoleName grantee, boolean recursive) { this.grantee = grantee.hasName() ? RoleResource.role(grantee.getName()) : null; this.recursive = recursive; }
public ListRolesStatement(RoleName grantee, boolean recursive) { this.grantee = grantee.hasName() ? RoleResource.role(grantee.getName()) : null; this.recursive = recursive; }
public ListPermissionsStatement(Set<Permission> permissions, IResource resource, RoleName grantee, boolean recursive) { this.permissions = permissions; this.resource = resource; this.recursive = recursive; this.grantee = grantee.hasName()? RoleResource.role(grantee.getName()) : null; }
private void collectRoles(Role role, Set<RoleResource> collected, boolean includeInherited) throws RequestValidationException, RequestExecutionException { for (String memberOf : role.memberOf) { Role granted = getRole(memberOf); if (granted.equals(NULL_ROLE)) continue; collected.add(RoleResource.role(granted.name)); if (includeInherited) collectRoles(granted, collected, true); } }
private void collectRoles(Role role, Set<RoleResource> collected, boolean includeInherited) throws RequestValidationException, RequestExecutionException { for (String memberOf : role.memberOf) { Role granted = getRole(memberOf); if (granted.equals(NULL_ROLE)) continue; collected.add(RoleResource.role(granted.name)); if (includeInherited) collectRoles(granted, collected, true); } }
public Set<RoleResource> getRoles(RoleResource grantee, boolean includeInherited) throws RequestValidationException, RequestExecutionException { Set<RoleResource> roles = new HashSet<>(); Role role = getRole(grantee.getRoleName()); if (!role.equals(NULL_ROLE)) { roles.add(RoleResource.role(role.name)); collectRoles(role, roles, includeInherited); } return roles; }
public Set<RoleResource> getRoles(RoleResource grantee, boolean includeInherited) throws RequestValidationException, RequestExecutionException { Set<RoleResource> roles = new HashSet<>(); Role role = getRole(grantee.getRoleName()); if (!role.equals(NULL_ROLE)) { roles.add(RoleResource.role(role.name)); collectRoles(role, roles, includeInherited); } return roles; }