Skip to content

Commit

Permalink
giving web admin role permission to administer nodes closes #1022326
Browse files Browse the repository at this point in the history
  • Loading branch information
troynt committed Jan 13, 2011
1 parent 2a195af commit b0d959b
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 6 deletions.
1 change: 1 addition & 0 deletions drupal/profiles/watershednow/watershednow.inc
Expand Up @@ -398,6 +398,7 @@ function _watershednow_define_perms() {
'collapse format fieldset by default',
'collapsible format selection',
'show more format tips link',
'administer nodes',
'administer blocks',
'administer comments',
'administer votesmart settings',
Expand Down
17 changes: 11 additions & 6 deletions drupal/sites/all/modules/features/wn_common/wn_common.install
Expand Up @@ -22,13 +22,18 @@ function wn_common_update_6000( &$sandbox ) {
include($_SERVER['DOCUMENT_ROOT'] . '/profiles/watershednow/libraries/install_profile_api/core/user.inc');

//add feed permissions to staff and web admin
foreach( array('web admin','staff') as $role) {
$new_permissions = array('staff' => array(
'administer feeds',
'clear update_feed feeds',
'import update_feed feeds',
));
$new_permissions['web admin'] = array_merge($new_permissions['staff'], array('administer nodes'));

foreach( $new_permissions as $role => $perms ) {
$role_rid = install_get_rid($role);
install_add_permissions($role_rid,array(
'administer feeds',
'clear update_feed feeds',
'import update_feed feeds',
));
if( $role_rid ) {
install_add_permissions($role_rid,$perms);
}
}

// Install Mollom for spam protection
Expand Down

0 comments on commit b0d959b

Please sign in to comment.