1

I am using Drupal 7, we have a total of 99 different instances of pretty much the same site. All sites have the user roles of adm_core and mgr_center.

We are currently using drush and puppet to apply changes/updates across sites.

What I'm wondering is if there is a drush command that I can use to just give adm_core the same privileges as mgr_center?

If not does anyone have suggestions on the best method to do this across all sites short of going and changing permissions site-by-site?

  • If there are the same set of users on each site, and each have the same UID you could just copy the users_roles table? – Felix Eve Apr 23 '14 at 13:19
  • @FelixEve: Wouldn't it be more the role_permission table instead of the user_roles table. – rooby Apr 23 '14 at 14:10
  • @rooby Yes, your right. users_roles = which users have which roles, role_permission = which permissions belong to each role – Felix Eve Apr 23 '14 at 14:11
0

I found this snippet for copying permissions from one role to another, which you can easily rewrite to a drush sql command and integrate in your current workflow.

0

You may write a little PHP script utilizing drupal core functions to add certain permissions to those two roles and execute that script with drush scr on all 99 sites.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.