mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-07-31 17:39:05 +00:00
RM-1827 ("Declare" actions become available for user only after re-login)
git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/modules/recordsmanagement/HEAD@101279 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
@@ -112,6 +112,7 @@ public class JSONConversionComponent extends org.alfresco.repo.jscript.app.JS
|
|||||||
/** Constants for checking the cache */
|
/** Constants for checking the cache */
|
||||||
private static final String RM_SITE_EXISTS = "rmSiteExists";
|
private static final String RM_SITE_EXISTS = "rmSiteExists";
|
||||||
private static final String RM_RECORD_CONTRIBUTORS_GROUP_MEMBERS = "rmRecordContributorsGroupMembers";
|
private static final String RM_RECORD_CONTRIBUTORS_GROUP_MEMBERS = "rmRecordContributorsGroupMembers";
|
||||||
|
private static final String RM_RECORD_CONTRIBUTORS_GROUP_NODE_REF = "rmRecordContributorsGroupNodeRef";
|
||||||
private static final String RM_SHOW_ACTIONS = "rmShowActions";
|
private static final String RM_SHOW_ACTIONS = "rmShowActions";
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -636,14 +637,20 @@ public class JSONConversionComponent extends org.alfresco.repo.jscript.app.JS
|
|||||||
{
|
{
|
||||||
Set<String> groupMembers = authorityService.getContainedAuthorities(AuthorityType.USER, AuthorityType.GROUP.getPrefixString() + recordContributorsGroupName, false);
|
Set<String> groupMembers = authorityService.getContainedAuthorities(AuthorityType.USER, AuthorityType.GROUP.getPrefixString() + recordContributorsGroupName, false);
|
||||||
getJsonConversionComponentCache().put(RM_RECORD_CONTRIBUTORS_GROUP_MEMBERS, groupMembers);
|
getJsonConversionComponentCache().put(RM_RECORD_CONTRIBUTORS_GROUP_MEMBERS, groupMembers);
|
||||||
|
|
||||||
|
NodeRef recordContributorNodeRef = authorityService.getAuthorityNodeRef(AuthorityType.GROUP.getPrefixString() + recordContributorsGroupName);
|
||||||
|
getJsonConversionComponentCache().put(RM_RECORD_CONTRIBUTORS_GROUP_NODE_REF, recordContributorNodeRef);
|
||||||
}
|
}
|
||||||
|
|
||||||
@SuppressWarnings("unchecked")
|
if (childAssocRef.getParentRef().equals(getJsonConversionComponentCache().get(RM_RECORD_CONTRIBUTORS_GROUP_NODE_REF)))
|
||||||
Set<String> recordContributorsMembers = (Set<String>) getJsonConversionComponentCache().get(RM_RECORD_CONTRIBUTORS_GROUP_MEMBERS);
|
|
||||||
String userName = (String) nodeService.getProperty(childAssocRef.getChildRef(), PROP_USERNAME);
|
|
||||||
if (StringUtils.isNotBlank(userName))
|
|
||||||
{
|
{
|
||||||
recordContributorsMembers.add(userName);
|
@SuppressWarnings("unchecked")
|
||||||
|
Set<String> recordContributorsMembers = (Set<String>) getJsonConversionComponentCache().get(RM_RECORD_CONTRIBUTORS_GROUP_MEMBERS);
|
||||||
|
String userName = (String) nodeService.getProperty(childAssocRef.getChildRef(), PROP_USERNAME);
|
||||||
|
if (StringUtils.isNotBlank(userName))
|
||||||
|
{
|
||||||
|
recordContributorsMembers.add(userName);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user