diff --git a/README.txt b/README.txt index bce7039..e16b30e 100644 --- a/README.txt +++ b/README.txt @@ -16,11 +16,11 @@ CONFIGURATION Suggested permissions are: - For authenticated users: View own roles - For user admins: View roles of all users - - For site admins: Administer exposed roles -* Customize exposed roles Administration » Configuration » People » Role Expose -* Exposed roles are visible in user profile page within My roles -tab -example.com/user/[uid]/roles if user has permissions to view them. +* Customize exposed roles below Role management area in + Administration » Configuration » People » Roles +* Exposed roles are visible in user profile page for users with permissions with +View own roles or View roles of all users (for own or all users, respectively). TODO ---- @@ -35,4 +35,4 @@ Current maintainer: This project was originally empirical part of a bachelor’s thesis: * Subject Automatic testing in Drupal 7 module development" * @see http://urn.fi/URN:NBN:fi:amk-2011112916150 -* in Finnish, abstract in English + (in Finnish, abstract in English) diff --git a/role_expose.module b/role_expose.module index 78c45f5..75a4d0e 100644 --- a/role_expose.module +++ b/role_expose.module @@ -160,7 +160,8 @@ function role_expose_user_access($account_id) { $account = user_load($account_id); } global $user; - if (user_access('view roles of all users') && user_access('access user profiles')) { + if ((user_access('view roles of all users') && + user_access('access user profiles')) || user_access('administer users')) { return TRUE; } elseif ($account->uid == $user->uid && user_access('view own roles')) {