mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-08-14 17:58:59 +00:00
Merged HEAD-BUG-FIX (5.0/Cloud) to HEAD (5.0/Cloud)
83943: Merged V4.2-BUG-FIX (4.2.4) to HEAD-BUG-FIX (5.0/Cloud) 82504: Merged V4.1-BUG-FIX (4.1.10) to V4.2-BUG-FIX (4.2.4) 81668: Merged DEV to V4.1-BUG-FIX (4.1.10) 80985 : MNT-12082 : Consumers can add comments using URL parameters, although they are not allowed to do so - Fixed the issue. Implemented a test to simulate the issue. 82513: Fix build failure after: Merged DEV to V4.1-BUG-FIX (4.1.10) 80985 : MNT-12082 : Consumers can add comments using URL parameters, although they are not allowed to do so - Fixed the issue. Implemented a test to simulate the issue. 83418: Add further hacks to the CommentsApiTest, which needs to be refactored to use RetryingTransactionHelper. 83679: MNT-12082 : Consumers can add comments using URL parameters, although they are not allowed to do so - Fixed build failure git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@84601 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
@@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright (C) 2005-2011 Alfresco Software Limited.
|
* Copyright (C) 2005-2014 Alfresco Software Limited.
|
||||||
*
|
*
|
||||||
* This file is part of Alfresco
|
* This file is part of Alfresco
|
||||||
*
|
*
|
||||||
@@ -254,7 +254,13 @@ public class BlogServiceImpl implements BlogService
|
|||||||
{
|
{
|
||||||
// Comment from the old JavaScript:
|
// Comment from the old JavaScript:
|
||||||
// disable permission inheritance. The result is that only the creator will have access to the draft
|
// disable permission inheritance. The result is that only the creator will have access to the draft
|
||||||
permissionService.setInheritParentPermissions(postNode.getChildRef(), false);
|
NodeRef draft = postNode.getChildRef();
|
||||||
|
permissionService.setInheritParentPermissions(draft, false);
|
||||||
|
|
||||||
|
// MNT-12082: give permissions to the post creator. He should be able to comment in his post's
|
||||||
|
// forumFolder and commentsFolder, where owner is System user
|
||||||
|
String creator = (String) nodeService.getProperty(draft, ContentModel.PROP_CREATOR);
|
||||||
|
permissionService.setPermission(draft, creator, permissionService.getAllPermission(), true);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@@ -474,6 +480,10 @@ public class BlogServiceImpl implements BlogService
|
|||||||
// this
|
// this
|
||||||
if (!permissionService.getInheritParentPermissions(blogPostNode))
|
if (!permissionService.getInheritParentPermissions(blogPostNode))
|
||||||
{
|
{
|
||||||
|
// MNT-12082
|
||||||
|
String creator = (String) nodeService.getProperty(blogPostNode, ContentModel.PROP_CREATOR);
|
||||||
|
permissionService.deletePermission(blogPostNode, creator, permissionService.getAllPermission());
|
||||||
|
|
||||||
permissionService.setInheritParentPermissions(blogPostNode, true);
|
permissionService.setInheritParentPermissions(blogPostNode, true);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user