RM-982: Normal user can File and Reject record they declared.

* FileUnfiledRecords and RejectRecords are now assignable capabilities
  * by default Admin, Records Manager, Security Manager and Power User have them
  * they can be added and removed from custom or default roles via the management UI
  * capability patch updated accordingly
  * extedned get roles ReST API to include/exclude system roles
  * In-Place Reader and In-Place Writer roles capabilities are configurable again, but their users and groups are not (as intended)



git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/modules/recordsmanagement/HEAD@55935 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
Roy Wetherall
2013-09-25 07:05:10 +00:00
parent c1f293eabf
commit 402110f843
11 changed files with 87 additions and 20 deletions

View File

@@ -122,7 +122,19 @@ public class RMv21CapabilityPatch extends ModulePatchComponent
addCapability(filePlan,
"FileDestructionReport",
FilePlanRoleService.ROLE_ADMIN,
FilePlanRoleService.ROLE_RECORDS_MANAGER);
FilePlanRoleService.ROLE_RECORDS_MANAGER);
addCapability(filePlan,
"RejectRecords",
FilePlanRoleService.ROLE_ADMIN,
FilePlanRoleService.ROLE_POWER_USER,
FilePlanRoleService.ROLE_RECORDS_MANAGER,
FilePlanRoleService.ROLE_SECURITY_OFFICER);
addCapability(filePlan,
"FileUnfiledRecords",
FilePlanRoleService.ROLE_ADMIN,
FilePlanRoleService.ROLE_POWER_USER,
FilePlanRoleService.ROLE_RECORDS_MANAGER,
FilePlanRoleService.ROLE_SECURITY_OFFICER);
}
if (logger.isDebugEnabled() == true)

View File

@@ -57,16 +57,24 @@ public class RmRolesGet extends RoleDeclarativeWebScript
{
throw new WebScriptException(Status.STATUS_FOUND, "File plan does not exist.");
}
// get the includesystem parameter
boolean includeSystem = false;
String includeSystemValue = req.getParameter("is");
if (includeSystemValue != null && includeSystemValue.length() != 0)
{
includeSystem = Boolean.parseBoolean(includeSystemValue);
}
// get the user filter
String user = req.getParameter("user");
if (user != null && user.length() != 0)
{
roles = filePlanRoleService.getRolesByUser(filePlan, user, false);
roles = filePlanRoleService.getRolesByUser(filePlan, user, includeSystem);
}
else
{
roles = filePlanRoleService.getRoles(filePlan, false);
roles = filePlanRoleService.getRoles(filePlan, includeSystem);
}
// get the auths parameter