Remove not supported moderation-permission (MGNLFORUM-250)

[MGNLFORUM-254] Only forum-forumName-user role is created when creating new forum Created: 05/Mar/14  Updated: 12/Mar/14  Resolved: 12/Mar/14

Status: Closed
Project: Forum (closed)
Component/s: security
Affects Version/s: None
Fix Version/s: 3.3

Type: Sub-task Priority: Neutral
Reporter: Christoph Meier Assignee: Roman Kovařík
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Template:
Date of First Response:

 Comments   
Comment by Roman Kovařík [ 06/Mar/14 ]
String createRolesForNewForumsPropertyValue = PropertyUtil.getString(installContext.getJCRSession(RepositoryConstants.CONFIG).getNode("/modules/forum/config"), "createRolesForNewForums"); 
assertEquals("false", createRolesForNewForumsPropertyValue);

You can use:

// THEN
        assertFalse(configSession.getProperty("/modules/forum/config/createRolesForNewForums").getBoolean());

Otherwise looks OK.

Comment by Christoph Meier [ 11/Mar/14 ]

The commit onto master was done against the parent ticket MGNLFORUM-250; all subtasks of MGNLFORUM-250 (251, 252, 253, 254, 255) have been committed against 250 on master.

Comment by Milan Divilek [ 11/Mar/14 ]

Reopen: This is more like suggestion of different approach than reopening of ticket.

If /modules/forum/config/createRolesForNewForums is set to true then info.magnolia.module.forum.DefaultForumManager#createForumRoles will create three roles "forum" + forumName + "user", "forum" + forumName + "moderator" and "forum" + forumName + "admin". "forum" + forumName + "moderator" and "forum" + forumName + "admin" are obsolete because of MGNLFORUM-253, but when you create new forum then you want add access to this forum to certain group of users so "forum" + forumName + "user" is still useful.
My suggestion is let createRolesForNewForums on true instead false. And then modify info.magnolia.module.forum.DefaultForumManager#createForumRoles to creates only "forum" + forumName + "user" role. So admins will not need create "forum" + forumName + "user" role every time when they create new forum.

Generated at Mon Feb 12 02:02:10 CET 2024 using Jira 9.4.2#940002-sha1:46d1a51de284217efdcb32434eab47a99af2938b.