Hi All. I have read many post that do ask for clarifying role and permission settings with Drupal Commons.
I propose to add a Site Manager role to the installation profile and elect this role to have user1 permissions.
This could be quite helpfully for Drupal Commons site developers as to differentiate and plan better the complex role permission settings that a Social Community implicate when you start to have a bunch of registered users and you also get a lot of interest of users that start to asking for contribute and you may have planned to have many Groups build already.

In case of Social Groups that you will have on a Social Community site, for sure you may want to delegate some Group Admin workflow administration. As for IMHO the role Community Manager is seen, identified and understood by newbies mostly with Group Admin role managed by the OG.module with an additional and differentiate administrative role for the whole Social Community site we could make development with Drupal Commons a bit more easier.

The part of code that would have eventually be to change lies in the drupal_commons.profile file.
This is only a draft, so do not use. More expert coder if interested may provide the full changes that eventually we may build in a patch.

// Define the "Site Manager" role name
define('DRUPAL_COMMONS_ADMIN_ROLE', 'Site Manager');

/**
 * Configure roles
 */
function drupal_commons_config_roles() {
  // Make sure default roles are set right (just in case)
  db_query("UPDATE {role} SET rid = 1 WHERE name = 'anonymous user'");
  db_query("UPDATE {role} SET rid = 2 WHERE name = 'authenticated user'");

// Add the "Site Manager" role
  db_query("INSERT INTO {role} (rid, name) VALUES (3, '%s')", t(DRUPAL_COMMONS_ADMIN_ROLE));
  
  // Add the "Community Manager" role
  db_query("INSERT INTO {role} (rid, name) VALUES (4, '%s')", t(DRUPAL_COMMONS_MANAGER_ROLE));
  
  // Add the "Content Manager" role
  db_query("INSERT INTO {role} (rid, name) VALUES (5, '%s')", t(DRUPAL_COMMONS_CONTENT_ROLE));
  
   // Make sure first user is a "Site Manager"
  db_query("INSERT INTO {users_roles} (uid, rid) VALUES (1, 3)");
}

There will be also to review the drupal_commons_perms.inc file for setting right permission suitable for a "Site Manager" role.

You feedback is welcome.

Comments

dfylstra’s picture

It is very simple to install the Admin Role module (http://drupal.org/project/adminrole) to do this. This module works fine with Drupal Commons 1.1. Unless I misunderstand what you are trying to do, there is no need to modify code in the drupal_commons.profile file.

Wolfflow’s picture

@dfylstra : Thank you for your replay, I already know very well admin role module. Of course it's a alternative. my intention is to get a "Site Manager" role, that means a admin role with the role named "Site Manager" for providing quite a bit more overview for users when visiting the users permission page and intuitively understand to have the role "Site manager" as to distinguish from the other one (Community manager & Content Manager) more easily.

Permissions on Drupal are not very simple to overview and more over when you have to go through a long period of testing for identify each one of the permissions sets each module have listed. Many Users get really confused about the unclear description of each permission and this delay a lot their learning curve.

Having one prominent role like "Site Manager" (and has UserID1 permissions alike in drupal commons) show up in the role & permission table will for sure made Drupal Commons users more aware when they start setting & testing permission.

mstef’s picture

Status: Active » Closed (fixed)