Organic groups allows a group administrator to add users to his or her group. OG Access should have some UI to allow section editors/admin to easily assign editors to their section, or any subsections of the current section.

It seems to be a bottle neck in needing the site administrator (or one with very many permissions) to be in charge of adding all users.

Using the example on Workbench Access

  • Museum
    • Exhibits
      • Exhibits Staff
    • Library
      • Library Staff
      • Library Visitors

In this example, there should be an easy way for those who manage the Exhibits section to add staff to the Exhibit Staff section, without needing to ask a 'super admin' to add those users.

Comments

agentrickard’s picture

Makes sense. Would require a sub-permission to 'assign workbench access', and changes to workbench_access_user_form().

Presumably, these new editors could not use the current admin UI, but would have to use the 'Section' tab on a user page. Yes?

JGonzalez’s picture

I think this would be the best approach. I think possibly a UI to be built that lists a users sections he manages, with the ability to add users to his sections would work as well, so that 'user page' isn't overload with administrative tasks.

Courtney.B’s picture

This functionality would be awesome to have!

bbinkovitz’s picture

Would it be expedient to add support for Administer Users By Role rather than duplicate functionality with another method of permission delegation?

agentrickard’s picture

I don't think so, because the UI for the settings are different.

jan.ptacek’s picture

Hi, i was in need of this feature, I tried to reuse the workbench_access_editors dialog:
first add a permission for assigning users into sections you got access to

function workbench_access_permission() {
+    'assign workbench subaccess' => array(
+      'title' => t('Assign users to OWN Workbench Access sections'),
+    ),

fix autocompletion for subassigners:

+/**
+ * Access callback for autocompletion
+ */
+function workbench_access_autocomplete_access() {
+  if (user_access('assign workbench access') || user_access('assign workbench subaccess')) {
+    return TRUE;
+  }
+  return FALSE;
+}
$items['workbench_access/autocomplete/%/%'] = array(
     'page callback' => 'workbench_access_autocomplete',
     'page arguments' => array(2, 3),
-    'access arguments' => array('assign workbench access'),
+    'access callback' => 'workbench_access_autocomplete_access',
     'type' => MENU_CALLBACK,
     'file' => 'workbench_access.pages.inc',
   );

then I have created an editors tab in my customised content overview, rendering the std workbench_access_editors callback, and limiting the access in my own access callback that checks whether I can access the section I try to add to:

$items['admin/my-content/%/editors'] = array(
			'title' => 'Share',
			'description' => 'Allow fellows to edit.',
			'page callback' => 'workbench_access_editors',
			'page arguments' => array('taxonomy', 2),
			'access callback' => 'MY_MODULE_menu_access',
			'access arguments' => array('taxonomy', 2),
			'type' => MENU_LOCAL_TASK,
			'weight' => 10,
			'file' => 'workbench_access.admin.inc',
			'file path' => drupal_get_path('module', 'workbench_access'),
	);
function MY_MODULE_menu_access() {
	$args = func_get_args();
	$section = array_pop($args);
	$account = $GLOBALS['user'];
	if (
	      user_access('assign workbench access')
	  || (user_access('assign workbench subaccess') && node_access('update', $section, $account))
	) {
		return TRUE;
	}
	return FALSE;
}

so far 3 days of drupal menus, tabs & workbench_access tinkering and not finished yet but I like it ;)

SlayJay’s picture

Issue summary: View changes

any update to this? I can't believe this basic functionality is missing