Merged 5.2.N (5.2.1) to HEAD (5.2)

129127 mmuller: Merged RETURN-OF-THE-API (5.2.0) to 5.2.N (5.2.1)
      128135 jvonka: v1 REST API:  fix possible NPE when optionally listing allowable ops for non-file/non-file (+ add sanity api test)
      REPO-488, REPO-514


git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@129321 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
Alexandru Epure
2016-08-09 14:09:33 +00:00
parent d95958cf76
commit 2664aa509c
2 changed files with 19 additions and 4 deletions

View File

@@ -903,9 +903,9 @@ public class NodesImpl implements Nodes
String perm = kv.getKey();
String op = kv.getValue();
if (perm.equals(PermissionService.ADD_CHILDREN) && type.equals(Type.DOCUMENT))
if (perm.equals(PermissionService.ADD_CHILDREN) && Type.DOCUMENT.equals(type))
{
// special case: do not return "create" (as an allowable op) for file/content types
// special case: do not return "create" (as an allowable op) for file/content types - note: 'type' can be null
continue;
}
else if (perm.equals(PermissionService.DELETE) && (isSpecialNodeDoNotDelete(nodeRef, nodeTypeQName)))