I have a role "editors" with 'administer nodes' permission setted. In FA interface this role is always enabled for view/see/edit/post/... and it's not modifiable. It's ok.
But users in that role can't view, see or post in any "editor-private" forum; while the FA interface clearly seems allows this sort of access. It seems that 'administer nodes' permission is taken care of only in UI, but not when checking for all real access grants. The containers/forums are not shown, are not available in the "Forums" list box when posting a new topic and trying to access them with direct URLs returns an "Access denied" error.
The only exception is that if I point the user directly to the "add topic" URL "node/add/forum/16", then the private forums/containers become available in the "Forums" list box and the new topic can be submitted.
P.S. Unfortunately I can't uses Devel DNA module because it have issues with PostgreSQL (that's the currently used DB).
| Comment | File | Size | Author |
|---|---|---|---|
| #4 | dna_editor.png | 41.14 KB | Kafu |
Comments
Comment #1
salvisYour "editors" role is not the one generated by FA for moderators, is it? That one has all four checkboxes grayed out, and you should never do anything with it yourself.
Otherwise, Post should not be grayed out. Without it, node administrators are not supposed to be able to post nodes or comments in that forum. They should always have View, See, Edit and Delete, though, and those cannot be withheld.
There have been some recent bug fixes in this area. Please update to 6.x-1.x-dev and let us know what you find.
This trick should not work anymore, if the user doesn't have the Post grant.
Re. your pgsql issues with DNA: please report them in the Devel queue. If no one reports them, they'll never get fixed...
Comment #2
Kafu commentedMy "editors" role is a local custom role, not the FA one (called "Forum Moderator", right?).
Yes, is as you stated: the container have (for the "editor" role) the View option enabled (and not editable), the See option enabled (and editable); the inner forum have (always for the "editor" role) the View, Edit and Delete options enabled (and not editable) and the Post option enabled (and editable).
Done and I can confirm the issue.
Done: #749408: Devel node access issues with PostgreSQL.
OT: I'm new to drupal.org site; is there a way to receive email notifications when someone post comments?Comment #3
salvisYes, FA's moderator role is called Forum Moderator by default.
Please update your DNA and follow the procedure that was described when you posted this issue.
Comment #4
Kafu commentedACL 6.x-1.x-dev, Forum Access 6.x-1.x-dev, Devel node access 6.x-1.19.
I don't know what is the expected behavior of DNA, but for all "forum" pages (forums/containers lists, topic lists) it don't output any information (maybe because they are not nodes?). It outputs something only when accessing a topic node, attached is a screenshot (access performed with the root account).
In 'devel/node_access/summary' the only notable information is that I "have 2 nodes in your node table which are not represented in your node_access table...", clicking on the link ('devel/node_access/view/NULL') returns a 404.
Comment #5
salvisThe node access system deals only with nodes, and so does DNA.
Your "editor user" having all zeroes is odd. It should have all 1s. Please try making some node access change in this forum, saving it, and then reverting the change and saving again. Does this help?
Could it be that you've added the "administer nodes" permission to the "editor user" role only after saving your forum's settings?
Comment #6
salvisWhile the all-zeroes is bad, it doesn't explain
Please copy/paste the second line of your forum_access.module file.
Comment #7
Kafu commented"administer nodes" permission to the "editor user" role was set before working with the forum's settings (the role already existed before enabling the forum module).
I think somewhere there's a missing check against "administer nodes" permission: I've temporarily removed the "administer nodes" permission from the "editor user" role, this showed that the container/forum check-boxes for the role was unchecked (and so the 0s reported by DNA). Then I've manually checked them for forum "A", leaving the check-boxes un-checked for forum "B". After re-enabling the "administer nodes" permission, access is granted only to forum "A" (with DNA showing 1s). Forum "B", also if the GUI shows the check-boxes checked (and not editable), is still not accessible (with DNA reporting 0s, the same as the previous screenshot).
A little update (maybe due the moving from 6.x-1.3 to 6.x-1.x-dev): only using direct URLs (e.g. "/node/60", "node/add/forum/16"), users with "editor user" role can now read, edit and post topics (but with DNA still reporting the 0s). But the containers and topic lists are still not shown (access denied error if direct URLs are used).
Comment #8
Kafu commentedProblems of concurrent postings ;)
// $Id: forum_access.module,v 1.61 2010/02/20 10:32:12 salvis Exp $
Comment #9
salvisThanks for the additional details, I see the problem now.
I still don't understand the zeroes, though, but they don't seem to matter, as you point out.
Comment #10
salvisSorry for taking so long to look into this.
Indeed, this seems to be mostly working now:
Are you seeing the same thing?
Comment #11
Kafu commentedHi Hans,
unfortunately I've done a lot of updates, and trying a test site with current "dev" versions of both FA and ACL I am unable to reproduce the original issue. Now all seems working right.
With my current setup I can confirm point 2. (111 access to 'administer nodes' users).
For point 3, if I'm correctly remembering, if I had a topic with url (using pathauto): 'http://localsite1.com/forum/forum1/14', it was not accessible; only using the canonical path 'http://localsite1.com/node/14' (where 14 was the node id) worked. While forum containers and topic lists, as they are not nodes, was unaccessible. I don't remember if links was shown or not, but as forum containers and topic lists was not shown, I think all links was "hidden". Now seems all ok.
For point 4, I've created two containers (one public, one private) each with 2 forums inside (privates for the private container, publics for the public container), and I don't experience your problem.
Comment #12
salvis@Kafu: Thank you for your follow-up. If I understand you correctly, everything works fine for you now, right?
I'm mostly away from Internet access for a week, but I'll investigate my item 4 and will post what I find.
Comment #13
Kafu commentedYes, everything works fine.
I had encountered the issue on an internal test site that now don't exists anymore. So I've copied our online site, installed and enabled FA and tried a setup similar to what was causing the issue. But now it works fine. I will play a little with it, if I encounter some strange behavior I will post back.
Comment #14
salvisNow I see what is happening. We are currently inserting 111 records even for roles that have the 'administer nodes' permission. This is really unnecessary, except for the forums page where grant_view is checked to decide whether to display a forum/container or not. I had some of these 111 records missing on my test site, probably as a result of some development work.
Resetting the permissions solved this inconsistency and my node administrator can now see all forums. Resetting the permissions turned out to be a bit of a pain because we've optimized away the permissions processing if we find that the user hasn't changed anything. While this should never be necessary, I still added an option to disable the optimization and force an update, without having to make and undo a change. Committed to the -dev version.
This checking of grant_view on the forums page is a left-over from when we tried to hide forum topics from the node administrator. Due to feedback from sun we gave this up a while ago. AFAICS this is the only place where we use those 111 records, and it doesn't make sense to burden the {node_access} table with them for no reason. Moreover, if you remove 'administer nodes' from the role, the 111 would stay behind and you'd have to manually clear the three checkboxes for each forum to get it out of the system.
So I have done quite a bit of refactoring with the following goals:
Obviously, a node administrator could post a forum topic in another forum and then move it to one where he has no posting rights. This mechanism is not intended to be secure (we don't give 'administer nodes' to anyone we don't trust!), but as a help to remind node administrators if they should not post in a given forum.
I've done a fair amount of refactoring and testing and committed the result to the -dev version (give it up to 12h to be repackaged). Please test this and let us know how it works!
Comment #15
Kafu commentedI've done some tests with your new "-dev" version (and I've found a backup of the original installation that shown the issue) and now it seems to work fine, as expected. Nice work.
Comment #16
DruKaz commentedI think my case is related to this:
I've got a role called "Full Admin" wich basically has all permissions (including 'administer nodes' and 'administer comments').
As a result, this role has grayed out yet checked edit- and delete-boxes for every forum. I however am unable to check the 'view'-permission for this role because "it also has administer forums-access" (it keeps disappearing when i save). (so because they have the 'administer forums'-permission, you are denying them to view and administer the forum?)
Full Admin's can view and post on all forums (if they have the post permission there) as well as edit the topic and comments. They however only get to see the delete-link on comments if they have an additional role (one without admin-permissions) that also has the delete-permission for that forum, but comment/delete/% doesn't give a permission denied error. So it seems that "Admin"-roles don't supply you with the rights to see the delete-link.
Full Admin's are also unable to edit forums at admin/content/forums for wich they don't have a role with the 'view'-permission. But because I can't assign the 'view'-permission to Full Admin's, I'd have to create another role that does have this permission and give every Full Admin this role too...
When I look at DNA, I get a surprising result: the role Full Admin is simply not listed on any topic.
The issue seems to happen at least since your 14/jul -dev-version.
Note: This hasn't got anything to do with my patches for those Edit-permissions, as I have also tested it with the unpatched versions.
PS I know you are working on remaking some stuff, but this is just to let you know of another symptom.
Comment #17
salvis@Kafu: Thank you for testing and feedback!
@DruKaz: The July 29 -dev version fixes the disappearing View permission. Roles with the 'administer nodes' permission don't get any DNA entries because they have full access without them. This is intentional.
We'll have to deal with the delete comment links as part of the comment links task.
Comment #18
salvisI found that the missing 'delete comment' link for users with the 'administer comments' permission was an issue of its own after all.
This is now fixed in the -dev version (give it up to 12h to be repackaged).
I believe this was the last open end in this thread.