function drush_role_add_perm

8.0.x role.drush.inc drush_role_add_perm($rid, $permissions = NULL)
6.x role.drush.inc drush_role_add_perm($rid, $permission = NULL)
7.x role.drush.inc drush_role_add_perm($rid, $permissions = NULL)
master role.drush.inc drush_role_add_perm($rid, $permissions = NULL)

Add a permission to the specified role.

File

commands/core/role.drush.inc, line 128

Code

function drush_role_add_perm($rid, $permission = NULL) {
  $result = drush_role_perm('add', $rid, $permission);
  if ($result !== FALSE) {
    drush_log(dt('Added "!perm" to "!role"', array('!perm' => $permission, '!role' => $result->name)), 'success');
    drush_drupal_cache_clear_all();
  }
  return $result;
}