More I study I think it's a bug.
Follow this:
When a new forum is added, it's acces, read-only, etc... is set.
This is done by a call to
addRole(PermissionControl pc,
String roleName, int forumId, String[] groups, boolean allow)
If nothing is selected in the groups html listbox then the method above is called with
allGroups and true as it's last 2 parameters, meaning that a value of 1 = allow will be added for each existing group.
When something is selected in the groups html listbox, the call above is made using that something as the groups and false for allowance, meaning that a value of 0 = not allow will be added for each selected group AND NOTHING for the other existing groups.
So, when
testing for allowance
in the class PermissionControl,
method
public boolean canAccess(String roleName, String roleValue)
the test is done as a search in the map of rolevalues, seeking for a value of allowance = true = 1, but remember that it was added to the db only the value of not allowed.
So I think it's a bug. Please tell me as soon as possible what you think, if I may correct it or I'm wrong.
Thanks
[originally posted on jforum.net by danidacila]