mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-07-31 17:39:05 +00:00
RM-1649 : (Access denied to Declare Record to Unfiled Records for user with Create Records capability)
- I handled the case when the destination folder is not a record folder and the user doesn't need File Record capability to create a record there - I wrote a unit test for it but the test is failing with access denied on calling hasAspect method git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/modules/recordsmanagement/HEAD@92359 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
@@ -121,13 +121,21 @@ public class CreateCapability extends DeclarativeCapability
|
||||
conditions.put("capabilityCondition.closed", Boolean.FALSE);
|
||||
conditions.put("capabilityCondition.cutoff", Boolean.FALSE);
|
||||
|
||||
|
||||
// if the destination folder is not a record folder and the user has filling capability on it, grant access to create the record
|
||||
if (checkConditions(destination, conditions) &&
|
||||
!recordFolderService.isRecordFolder(destination) )
|
||||
{
|
||||
return AccessDecisionVoter.ACCESS_GRANTED;
|
||||
}
|
||||
|
||||
if (checkConditions(destination, conditions) &&
|
||||
recordFolderService.isRecordFolder(destination) &&
|
||||
permissionService.hasPermission(destination, RMPermissionModel.FILE_RECORDS) == AccessStatus.ALLOWED)
|
||||
{
|
||||
return AccessDecisionVoter.ACCESS_GRANTED;
|
||||
}
|
||||
|
||||
|
||||
conditions.put("capabilityCondition.closed", Boolean.TRUE);
|
||||
if (checkConditions(destination, conditions) &&
|
||||
recordFolderService.isRecordFolder(destination) &&
|
||||
|
Reference in New Issue
Block a user