Exporting Roles as a Feature in Drupal

We are currently trying to add more content managers to our Drupal site so that the University can be more responsible and active in keeping the website up to date. We’re starting with University Communications and the news team. I made a Content Manager role and a News Editor role for them. The problem with Drupal is… permissions. So many permissions. Our site has 338 permissions. Each of these has a checkbox. For each role. So, creating this in my local install, then in our staging instance, and then on the live server would be very, very, tedious and probably give me carpal tunnel.

Matt, our resident expert, has been long touting the virtues of Features – the ability to export just about anything from Drupal and then import it as a module, thus saving lots and lots of work. However, roles don’t export very well. The first time we tried it, we checked off all the permissions, and on import, lots of things got messed up. The next time, Matt suggested we try installing the Role Export module and only export the permissions that were needed by the new roles. We enabled Role Export on the staging site, enabled the Feature, and all was well! Test accounts were made, and hopefully the news team will soon be able to work in the Drupal site. Ideally, we’re working towards having faculty be able to update their own profiles (and only their own profiles), thus cutting down on content entry work for our team.

Leave a Reply

Your email address will not be published. Required fields are marked *