public class SecurityManagementUtils extends Object
User system management helper class shared between backend and client side of the application.
Modifier and Type | Field and Description |
---|---|
static Capability[] |
GROUPS_CAPABILITIES |
static Capability[] |
ROLES_CAPABILITIES |
static Capability[] |
USERS_CAPABILITIES |
Constructor and Description |
---|
SecurityManagementUtils() |
Modifier and Type | Method and Description |
---|---|
static org.jboss.errai.security.shared.api.identity.User |
clone(org.jboss.errai.security.shared.api.identity.User user) |
static org.jboss.errai.security.shared.api.Group |
createGroup(String name) |
static org.jboss.errai.security.shared.api.Role |
createRole(String name) |
static org.jboss.errai.security.shared.api.identity.User |
createUser(String id) |
static org.jboss.errai.security.shared.api.identity.User |
createUser(String id,
Set<org.jboss.errai.security.shared.api.Group> groups) |
static org.jboss.errai.security.shared.api.identity.User |
createUser(String id,
Set<org.jboss.errai.security.shared.api.Group> groups,
Set<org.jboss.errai.security.shared.api.Role> roles) |
static org.jboss.errai.security.shared.api.identity.User |
createUser(String id,
Set<org.jboss.errai.security.shared.api.Group> groups,
Set<org.jboss.errai.security.shared.api.Role> roles,
Map<String,String> properties) |
static Set<org.jboss.errai.security.shared.api.Group> |
getGroups(UserSystemManager userSystemManager,
String username) |
static Set<String> |
getRegisteredRoleNames() |
static Set<org.jboss.errai.security.shared.api.Role> |
getRegisteredRoles() |
static Set<org.jboss.errai.security.shared.api.Role> |
getRoles(UserSystemManager userSystemManager,
String username) |
static Set<String> |
groupsToString(Set<org.jboss.errai.security.shared.api.Group> groups) |
static void |
populateGroupOrRoles(String name,
Set<String> registeredRoles,
Set<org.jboss.errai.security.shared.api.Group> groups,
Set<org.jboss.errai.security.shared.api.Role> roles)
Utility method that check if the given group or role name is in the list of registeredRoles, if it is,
it adds the Role for the given name in the given roles set argument, otherwise, into the list.
|
static Set<String> |
rolesToString(Set<org.jboss.errai.security.shared.api.Role> roles) |
public static final Capability[] USERS_CAPABILITIES
public static final Capability[] GROUPS_CAPABILITIES
public static final Capability[] ROLES_CAPABILITIES
public static org.jboss.errai.security.shared.api.identity.User createUser(String id)
public static org.jboss.errai.security.shared.api.identity.User createUser(String id, Set<org.jboss.errai.security.shared.api.Group> groups)
public static org.jboss.errai.security.shared.api.identity.User createUser(String id, Set<org.jboss.errai.security.shared.api.Group> groups, Set<org.jboss.errai.security.shared.api.Role> roles)
public static org.jboss.errai.security.shared.api.identity.User createUser(String id, Set<org.jboss.errai.security.shared.api.Group> groups, Set<org.jboss.errai.security.shared.api.Role> roles, Map<String,String> properties)
public static org.jboss.errai.security.shared.api.Group createGroup(String name)
public static org.jboss.errai.security.shared.api.Role createRole(String name)
public static org.jboss.errai.security.shared.api.identity.User clone(org.jboss.errai.security.shared.api.identity.User user)
public static Set<org.jboss.errai.security.shared.api.Group> getGroups(UserSystemManager userSystemManager, String username)
public static Set<org.jboss.errai.security.shared.api.Role> getRoles(UserSystemManager userSystemManager, String username)
public static Set<org.jboss.errai.security.shared.api.Role> getRegisteredRoles()
public static void populateGroupOrRoles(String name, Set<String> registeredRoles, Set<org.jboss.errai.security.shared.api.Group> groups, Set<org.jboss.errai.security.shared.api.Role> roles)
public static Set<String> rolesToString(Set<org.jboss.errai.security.shared.api.Role> roles)
Copyright © 2012–2019 JBoss by Red Hat. All rights reserved.