RM-552 (Add 'Manage Permission' action to file plan toolbar)

git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/modules/recordsmanagement/HEAD@43798 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
Tuna Aksoy
2012-11-21 15:46:56 +00:00
parent 563defda1d
commit 36303d5de9
3 changed files with 35 additions and 4 deletions

View File

@@ -143,4 +143,17 @@
</property> </property>
</bean> </bean>
<bean id="rmManagePermissionsCapability"
parent="declarativeCapability">
<property name="name" value="ManagePermissions"/>
<property name="private" value="true"/>
<property name="permission" value="ManageAccessRights"/>
<property name="conditions">
<map>
<entry key="capabilityCondition.frozen" value="false"/>
<entry key="capabilityCondition.closed" value="false"/>
<entry key="capabilityCondition.filling" value="true"/>
</map>
</property>
</bean>
</beans> </beans>

View File

@@ -538,7 +538,22 @@
<property name="name" value="export"/> <property name="name" value="export"/>
<property name="capability" value="ViewRecords"/> <property name="capability" value="ViewRecords"/>
</bean> </bean>
<bean id="jsonConversionComponent.managePermissions"
parent="jsonConversionComponent.baseAction">
<property name="name" value="managePerms"/>
<property name="kinds">
<set>
<value>FILE_PLAN</value>
<!-- FIXME: Should we enable the button also for record category and record folder
<value>RECORD_CATEGORY</value>
<value>RECORD_FOLDER</value>
-->
</set>
</property>
<property name="capability" value ="ManagePermissions"/>
</bean>
<bean id="jsonConversionComponent.relinquish" <bean id="jsonConversionComponent.relinquish"
parent="jsonConversionComponent.baseAction"> parent="jsonConversionComponent.baseAction">
<property name="name" value="relinquish"/> <property name="name" value="relinquish"/>

View File

@@ -913,9 +913,12 @@ public class RecordsManagementSecurityServiceImpl implements RecordsManagementSe
AuthenticationUtil.runAs(new AuthenticationUtil.RunAsWork<Object>() AuthenticationUtil.runAs(new AuthenticationUtil.RunAsWork<Object>()
{ {
public Boolean doWork() throws Exception public Boolean doWork() throws Exception
{ {
if (recordsManagementService.isFilePlan(nodeRef) == false && if (recordsManagementService.isFilePlan(nodeRef) == true)
recordsManagementService.isRecordsManagementContainer(nodeRef) == true) {
setPermissionDown(nodeRef, authority, permission);
}
else if (recordsManagementService.isRecordsManagementContainer(nodeRef) == true)
{ {
setReadPermissionUp(nodeRef, authority); setReadPermissionUp(nodeRef, authority);
setPermissionDown(nodeRef, authority, permission); setPermissionDown(nodeRef, authority, permission);