backdrop-contrib / backdrop-drush-extension

A set of commands and boot class for Drush and Backdrop CMS.
GNU General Public License v2.0
13 stars 18 forks source link

Add support for drush role-add-perm (rap) #172

Open jackaponte opened 5 years ago

jackaponte commented 5 years ago

This is another Drush command that would be very handy for my shop's Backdrop development; I imagine it would come in handy for others doing similar work as well.

jackaponte commented 5 years ago

Working on this on https://github.com/jackaponte/drush/tree/role-add-perm. I've got to a point where I think things are working right until I hit this error:

drush rap 'anonymous' 'post comments'                  
Error: Call to undefined method stdClass::getAllModulePerms() in backdrop_command_role_perm() (line 229 of /opt/drush/8/drush/drush/commands/backdrop/commands/core/backdrop_role.drush.inc).
Drush command terminated abnormally due to an unrecoverable error.                 

The function @getAllModulePerms@ is in @/opt/drush/8/drush/drush/lib/Drush/Role/RoleBase.php@ which is a whole file of Drupal 6, 7 and 8 stuff that looks important to all of these Drush role commands, but I'm not sure how or where to duplicate that file for Backdrop.

jackaponte commented 5 years ago

Adding the "help wanted" label here because I'm feeling quite stuck! I might return to this a bit later but will unassign myself from the task should it feel beyond me when I do.