I started a new job a few weeks ago, so despite my best efforts, I haven't had time to add anything more to this blog since I opened it.
Earlier today I was working on an almost complete site in Drupal. The site is almost ready to go live, it's just a matter of a few last minute configuration changes. I was working on the permissions for a content editor role. Basically, this role was to be able to create, edit and delete any content on the site, as well as manage the sites users. The caveat is that one of the modules that is installed is the WebForms module. This module allows an administrator to create forms for users to fill in. It has a bunch of useful features, and installs a new content type to facilitate the creation of these forms.
What I wanted to do was remove access to this content type for a content editor. Because the webforms content type is only really a psuedo content type, it doesn't have the permissions set up in the same way. The webforms module exposes a bunch of other permissions, one of which is "allowed to create new WebForms". This would seem to be the permission I am looking for. However, when I remove permissions to the role and then log in as a user who is part of the role, I am still able to create webforms.
A little digging through the forums, and some playing around, and I come across the problem. A user who has the permission 'Administer Nodes' is automatically given permission to create WebForms. This makes the create WebForms permission reduntant, or at least in the context that I'm using it in. I could take away Administer Nodes permission, but then my content editor would not be given permission to access the list of all nodes. This is obviously not a workable solution, as the editor really needs access to a list of content to edit.
The best solution I've come up with is to disable the WebForms menu option. It no longer shows up in the navigation menu, and also does not show up on the create content page. The disadvantage with this is that an administrator can not see the option either. Also, a content editor can create a WebForm, if they know the path to the correct page.
In the context of my site, neither of these are of a huge concern, because the layout of the site will remain largely unchanged when it goes live. Also, there are only likely to be two or three content editors, and they will all be trustworthy. Moreover, the users are almost certainly going to be either Dentists or their receptionists, neither of which are in the high danger zone for being hackers!
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment