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 ActionStatus
assignRole(String roleId, String principal)
Deprecated.Assigns the role indicated by the roleId to the given principalActionStatus
assignRoleByName(String roleName, String principal)
Deprecated.Assigns the role indicated by the roleName to the given principalActionStatus
assignTemplatedRole(String templateId, String resource, String principal)
Deprecated.Assigns the templated role indicated by the templateId fails if the templated role has not been createdActionStatus
createTemplatedRole(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.Role
getRole(String roleName)
Deprecated.ActionStatus
removeTemplatedRole(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 roleBoolean
roleExists(String roleId)
Deprecated.true of a role exists with the given roleIdBoolean
templatedRoleExists(String templateId, String resource)
Deprecated.true of a role exists with the given roleIdActionStatus
unassignRole(String roleId, String principal)
Deprecated.Unassigns the role indicated by the role id from the given principalActionStatus
unassignRoleByName(String roleName, String principal)
Deprecated.Unassigns the role indicated by the role name from the given principalActionStatus
updateRole(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 roleActionStatus
updateRoleDescription(String roleName, String description)
Deprecated.ActionStatus
updateRoleUsers(Role role)
Deprecated.update users assigned to a roleActionStatus
updateUserRoles(User user)
Deprecated.update roles assigned to a userVerificationStatus
verifyTemplatedRole(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:
createTemplatedRole
in interfaceRoleManagementService
- Throws:
RedbackServiceException
-
removeTemplatedRole
public ActionStatus removeTemplatedRole(String templateId, String resource) throws RedbackServiceException
Deprecated.Description copied from interface:RoleManagementService
removes 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:
removeTemplatedRole
in interfaceRoleManagementService
- Throws:
RedbackServiceException
-
updateRole
public ActionStatus updateRole(String templateId, String oldResource, String newResource) throws RedbackServiceException
Deprecated.Description copied from interface:RoleManagementService
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 role- Specified by:
updateRole
in interfaceRoleManagementService
- Throws:
RedbackServiceException
-
assignRole
public ActionStatus assignRole(String roleId, String principal) throws RedbackServiceException
Deprecated.Description copied from interface:RoleManagementService
Assigns the role indicated by the roleId to the given principal- Specified by:
assignRole
in interfaceRoleManagementService
- Throws:
RedbackServiceException
-
assignRoleByName
public ActionStatus assignRoleByName(String roleName, String principal) throws RedbackServiceException
Deprecated.Description copied from interface:RoleManagementService
Assigns the role indicated by the roleName to the given principal- Specified by:
assignRoleByName
in interfaceRoleManagementService
- Throws:
RedbackServiceException
-
assignTemplatedRole
public ActionStatus assignTemplatedRole(String templateId, String resource, String principal) throws RedbackServiceException
Deprecated.Description copied from interface:RoleManagementService
Assigns the templated role indicated by the templateId fails if the templated role has not been created- Specified by:
assignTemplatedRole
in interfaceRoleManagementService
- Throws:
RedbackServiceException
-
unassignRole
public ActionStatus unassignRole(String roleId, String principal) throws RedbackServiceException
Deprecated.Description copied from interface:RoleManagementService
Unassigns the role indicated by the role id from the given principal- Specified by:
unassignRole
in interfaceRoleManagementService
- Throws:
RedbackServiceException
-
unassignRoleByName
public ActionStatus unassignRoleByName(String roleName, String principal) throws RedbackServiceException
Deprecated.Description copied from interface:RoleManagementService
Unassigns the role indicated by the role name from the given principal- Specified by:
unassignRoleByName
in interfaceRoleManagementService
- Throws:
RedbackServiceException
-
roleExists
public Boolean roleExists(String roleId) throws RedbackServiceException
Deprecated.Description copied from interface:RoleManagementService
true of a role exists with the given roleId- Specified by:
roleExists
in interfaceRoleManagementService
- Returns:
- Throws:
RedbackServiceException
-
templatedRoleExists
public Boolean templatedRoleExists(String templateId, String resource) throws RedbackServiceException
Deprecated.Description copied from interface:RoleManagementService
true of a role exists with the given roleId- Specified by:
templatedRoleExists
in interfaceRoleManagementService
- Returns:
- Throws:
RedbackServiceException
-
verifyTemplatedRole
public VerificationStatus verifyTemplatedRole(String templateId, String resource) throws RedbackServiceException
Deprecated.Description copied from interface:RoleManagementService
Check a role template is complete in the RBAC store.- Specified by:
verifyTemplatedRole
in interfaceRoleManagementService
- Parameters:
templateId
- the templated roleresource
- the resource to verify- Throws:
RedbackServiceException
-
getEffectivelyAssignedRoles
public List<Role> getEffectivelyAssignedRoles(String username) throws RedbackServiceException
Deprecated.- Specified by:
getEffectivelyAssignedRoles
in interfaceRoleManagementService
- Throws:
RedbackServiceException
-
getApplications
public List<Application> getApplications(String username) throws RedbackServiceException
Deprecated.- Specified by:
getApplications
in interfaceRoleManagementService
- Throws:
RedbackServiceException
-
getAllRoles
public List<Role> getAllRoles() throws RedbackServiceException
Deprecated.- Specified by:
getAllRoles
in interfaceRoleManagementService
- Throws:
RedbackServiceException
-
getDetailedAllRoles
public List<Role> getDetailedAllRoles() throws RedbackServiceException
Deprecated.- Specified by:
getDetailedAllRoles
in interfaceRoleManagementService
- Throws:
RedbackServiceException
-
getRole
public Role getRole(String roleName) throws RedbackServiceException
Deprecated.- Specified by:
getRole
in interfaceRoleManagementService
- Throws:
RedbackServiceException
-
updateRoleDescription
public ActionStatus updateRoleDescription(String roleName, String description) throws RedbackServiceException
Deprecated.- Specified by:
updateRoleDescription
in interfaceRoleManagementService
- Throws:
RedbackServiceException
-
updateRoleUsers
public ActionStatus updateRoleUsers(Role role) throws RedbackServiceException
Deprecated.Description copied from interface:RoleManagementService
update users assigned to a role- Specified by:
updateRoleUsers
in interfaceRoleManagementService
- Throws:
RedbackServiceException
-
getApplicationRoles
public List<ApplicationRoles> getApplicationRoles(String username) throws RedbackServiceException
Deprecated.- Specified by:
getApplicationRoles
in interfaceRoleManagementService
- Throws:
RedbackServiceException
-
updateUserRoles
public ActionStatus updateUserRoles(User user) throws RedbackServiceException
Deprecated.Description copied from interface:RoleManagementService
update roles assigned to a user- Specified by:
updateUserRoles
in 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
-
-