Class DefaultRoleManagementService
- java.lang.Object
-
- org.apache.archiva.redback.rest.services.DefaultRoleManagementService
-
- All Implemented Interfaces:
RoleManagementService
@Deprecated @Service("roleManagementService#rest") public class DefaultRoleManagementService extends Object implements RoleManagementService
Deprecated.Use the new V2 versionDefaultRoleService- Since:
- 1.3
- Author:
- Olivier Lamy
-
-
Constructor Summary
Constructors Constructor Description DefaultRoleManagementService(RoleManager roleManager, RBACManager rbacManager, UserManager userManager)Deprecated.
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description ActionStatusassignRole(String roleId, String principal)Deprecated.Assigns the role indicated by the roleId to the given principalActionStatusassignRoleByName(String roleName, String principal)Deprecated.Assigns the role indicated by the roleName to the given principalActionStatusassignTemplatedRole(String templateId, String resource, String principal)Deprecated.Assigns the templated role indicated by the templateId fails if the templated role has not been createdActionStatuscreateTemplatedRole(String templateId, String resource)Deprecated.protected List<? extends Role>filterRolesForCurrentUserAccess(List<? extends Role> roleList)Deprecated.this is a hack.List<Role>getAllRoles()Deprecated.List<ApplicationRoles>getApplicationRoles(String username)Deprecated.List<Application>getApplications(String username)Deprecated.List<Role>getDetailedAllRoles()Deprecated.List<Role>getEffectivelyAssignedRoles(String username)Deprecated.RolegetRole(String roleName)Deprecated.ActionStatusremoveTemplatedRole(String templateId, String resource)Deprecated.removes a role corresponding to the role Id that was manufactured with the given resource it also removes any user assignments for that roleBooleanroleExists(String roleId)Deprecated.true of a role exists with the given roleIdBooleantemplatedRoleExists(String templateId, String resource)Deprecated.true of a role exists with the given roleIdActionStatusunassignRole(String roleId, String principal)Deprecated.Unassigns the role indicated by the role id from the given principalActionStatusunassignRoleByName(String roleName, String principal)Deprecated.Unassigns the role indicated by the role name from the given principalActionStatusupdateRole(String templateId, String oldResource, String newResource)Deprecated.allows for a role coming from a template to be renamed effectively swapping out the bits of it that were labeled with the oldResource with the newResource it also manages any user assignments for that roleActionStatusupdateRoleDescription(String roleName, String description)Deprecated.ActionStatusupdateRoleUsers(Role role)Deprecated.update users assigned to a roleActionStatusupdateUserRoles(User user)Deprecated.update roles assigned to a userVerificationStatusverifyTemplatedRole(String templateId, String resource)Deprecated.Check a role template is complete in the RBAC store.
-
-
-
Constructor Detail
-
DefaultRoleManagementService
@Inject public DefaultRoleManagementService(RoleManager roleManager, @Named("rbacManager#default") RBACManager rbacManager, @Named("userManager#default") UserManager userManager)
Deprecated.
-
-
Method Detail
-
createTemplatedRole
public ActionStatus createTemplatedRole(String templateId, String resource) throws RedbackServiceException
Deprecated.- Specified by:
createTemplatedRolein interfaceRoleManagementService- Throws:
RedbackServiceException
-
removeTemplatedRole
public ActionStatus removeTemplatedRole(String templateId, String resource) throws RedbackServiceException
Deprecated.Description copied from interface:RoleManagementServiceremoves a role corresponding to the role Id that was manufactured with the given resource it also removes any user assignments for that role- Specified by:
removeTemplatedRolein interfaceRoleManagementService- Throws:
RedbackServiceException
-
updateRole
public ActionStatus updateRole(String templateId, String oldResource, String newResource) throws RedbackServiceException
Deprecated.Description copied from interface:RoleManagementServiceallows for a role coming from a template to be renamed effectively swapping out the bits of it that were labeled with the oldResource with the newResource it also manages any user assignments for that role- Specified by:
updateRolein interfaceRoleManagementService- Throws:
RedbackServiceException
-
assignRole
public ActionStatus assignRole(String roleId, String principal) throws RedbackServiceException
Deprecated.Description copied from interface:RoleManagementServiceAssigns the role indicated by the roleId to the given principal- Specified by:
assignRolein interfaceRoleManagementService- Throws:
RedbackServiceException
-
assignRoleByName
public ActionStatus assignRoleByName(String roleName, String principal) throws RedbackServiceException
Deprecated.Description copied from interface:RoleManagementServiceAssigns the role indicated by the roleName to the given principal- Specified by:
assignRoleByNamein interfaceRoleManagementService- Throws:
RedbackServiceException
-
assignTemplatedRole
public ActionStatus assignTemplatedRole(String templateId, String resource, String principal) throws RedbackServiceException
Deprecated.Description copied from interface:RoleManagementServiceAssigns the templated role indicated by the templateId fails if the templated role has not been created- Specified by:
assignTemplatedRolein interfaceRoleManagementService- Throws:
RedbackServiceException
-
unassignRole
public ActionStatus unassignRole(String roleId, String principal) throws RedbackServiceException
Deprecated.Description copied from interface:RoleManagementServiceUnassigns the role indicated by the role id from the given principal- Specified by:
unassignRolein interfaceRoleManagementService- Throws:
RedbackServiceException
-
unassignRoleByName
public ActionStatus unassignRoleByName(String roleName, String principal) throws RedbackServiceException
Deprecated.Description copied from interface:RoleManagementServiceUnassigns the role indicated by the role name from the given principal- Specified by:
unassignRoleByNamein interfaceRoleManagementService- Throws:
RedbackServiceException
-
roleExists
public Boolean roleExists(String roleId) throws RedbackServiceException
Deprecated.Description copied from interface:RoleManagementServicetrue of a role exists with the given roleId- Specified by:
roleExistsin interfaceRoleManagementService- Returns:
- Throws:
RedbackServiceException
-
templatedRoleExists
public Boolean templatedRoleExists(String templateId, String resource) throws RedbackServiceException
Deprecated.Description copied from interface:RoleManagementServicetrue of a role exists with the given roleId- Specified by:
templatedRoleExistsin interfaceRoleManagementService- Returns:
- Throws:
RedbackServiceException
-
verifyTemplatedRole
public VerificationStatus verifyTemplatedRole(String templateId, String resource) throws RedbackServiceException
Deprecated.Description copied from interface:RoleManagementServiceCheck a role template is complete in the RBAC store.- Specified by:
verifyTemplatedRolein interfaceRoleManagementService- Parameters:
templateId- the templated roleresource- the resource to verify- Throws:
RedbackServiceException
-
getEffectivelyAssignedRoles
public List<Role> getEffectivelyAssignedRoles(String username) throws RedbackServiceException
Deprecated.- Specified by:
getEffectivelyAssignedRolesin interfaceRoleManagementService- Throws:
RedbackServiceException
-
getApplications
public List<Application> getApplications(String username) throws RedbackServiceException
Deprecated.- Specified by:
getApplicationsin interfaceRoleManagementService- Throws:
RedbackServiceException
-
getAllRoles
public List<Role> getAllRoles() throws RedbackServiceException
Deprecated.- Specified by:
getAllRolesin interfaceRoleManagementService- Throws:
RedbackServiceException
-
getDetailedAllRoles
public List<Role> getDetailedAllRoles() throws RedbackServiceException
Deprecated.- Specified by:
getDetailedAllRolesin interfaceRoleManagementService- Throws:
RedbackServiceException
-
getRole
public Role getRole(String roleName) throws RedbackServiceException
Deprecated.- Specified by:
getRolein interfaceRoleManagementService- Throws:
RedbackServiceException
-
updateRoleDescription
public ActionStatus updateRoleDescription(String roleName, String description) throws RedbackServiceException
Deprecated.- Specified by:
updateRoleDescriptionin interfaceRoleManagementService- Throws:
RedbackServiceException
-
updateRoleUsers
public ActionStatus updateRoleUsers(Role role) throws RedbackServiceException
Deprecated.Description copied from interface:RoleManagementServiceupdate users assigned to a role- Specified by:
updateRoleUsersin interfaceRoleManagementService- Throws:
RedbackServiceException
-
getApplicationRoles
public List<ApplicationRoles> getApplicationRoles(String username) throws RedbackServiceException
Deprecated.- Specified by:
getApplicationRolesin interfaceRoleManagementService- Throws:
RedbackServiceException
-
updateUserRoles
public ActionStatus updateUserRoles(User user) throws RedbackServiceException
Deprecated.Description copied from interface:RoleManagementServiceupdate roles assigned to a user- Specified by:
updateUserRolesin interfaceRoleManagementService- Throws:
RedbackServiceException
-
filterRolesForCurrentUserAccess
protected List<? extends Role> filterRolesForCurrentUserAccess(List<? extends Role> roleList) throws RedbackServiceException
Deprecated.this is a hack. this is a hack around the requirements of putting RBAC constraints into the model. this adds one very major restriction to this security system, that a role name must contain the identifiers of the resource that is being constrained for adding and granting of roles, this is unacceptable in the long term and we need to get the model refactored to include this RBAC concept- Parameters:
roleList-- Returns:
- Throws:
RedbackServiceException
-
-