mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-07-31 17:39:05 +00:00
Merge pull request #1272 from Alfresco/feature-3.4/APPS-322
APPS-322: [RM/AGS]User without permissions can create categories when Create full path option is checked in rule
This commit is contained in:
@@ -379,11 +379,6 @@ public abstract class CopyMoveLinkFileToBaseAction extends RMActionExecuterAbstr
|
|||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
private NodeRef createChild(final Action action, final NodeRef parent, final String childName, final boolean targetisUnfiledRecords, final boolean lastAsFolder)
|
private NodeRef createChild(final Action action, final NodeRef parent, final String childName, final boolean targetisUnfiledRecords, final boolean lastAsFolder)
|
||||||
{
|
|
||||||
return AuthenticationUtil.runAsSystem(new RunAsWork<NodeRef>()
|
|
||||||
{
|
|
||||||
@Override
|
|
||||||
public NodeRef doWork()
|
|
||||||
{
|
{
|
||||||
// double check that the child hasn't been created by another thread
|
// double check that the child hasn't been created by another thread
|
||||||
NodeRef child = getChild(parent, childName);
|
NodeRef child = getChild(parent, childName);
|
||||||
@@ -401,7 +396,7 @@ public abstract class CopyMoveLinkFileToBaseAction extends RMActionExecuterAbstr
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
// ensure we are not trying to create a record categtory in a record folder
|
// ensure we are not trying to create a record category in a record folder
|
||||||
if (RecordsManagementModel.TYPE_RECORD_FOLDER.equals(getNodeService().getType(parent)))
|
if (RecordsManagementModel.TYPE_RECORD_FOLDER.equals(getNodeService().getType(parent)))
|
||||||
{
|
{
|
||||||
throw new AlfrescoRuntimeException("Unable to execute " + action.getActionDefinitionName() + " action, because the destination path has a record category within a record folder.");
|
throw new AlfrescoRuntimeException("Unable to execute " + action.getActionDefinitionName() + " action, because the destination path has a record category within a record folder.");
|
||||||
@@ -413,8 +408,6 @@ public abstract class CopyMoveLinkFileToBaseAction extends RMActionExecuterAbstr
|
|||||||
}
|
}
|
||||||
return child;
|
return child;
|
||||||
}
|
}
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Return the context. This will be the unfiled records container of the context if targetisUnfiledRecords is true
|
* Return the context. This will be the unfiled records container of the context if targetisUnfiledRecords is true
|
||||||
|
Reference in New Issue
Block a user