change permission name in usersearch.module

jpd972 - June 10, 2008 - 17:11
Project:Core searches
Version:5.x-1.x-dev
Component:Code
Category:bug report
Priority:normal
Assigned:Unassigned
Status:active
Description

There should be a new permission 'search users' that should be used instead of 'access user profiles'.

It has to be implemented in usersearch.module:

-      if (user_access('access user profiles')) {
+      if (user_access('search users')) {

And also in the patch to user.module:

function user_perm() {
-  return array('administer access control', 'administer users', 'access user profiles', 'change own username');
+  return array('administer access control', 'administer users', 'access user profiles', 'change own username', 'search users');

#1

robertDouglass - July 7, 2008 - 11:24
Status:needs work» won't fix

Disagree. If you can search for users it is the same as accessing their profile information.

#2

jpd972 - July 8, 2008 - 14:20
Status:won't fix» active

(reopening)

What about this then?

-      if (user_access('access user profiles')) {
+      if (user_access('access user profiles') && user_access('search users')) {

The rationale for it is that we want users to be able to access other profiles (comments, buddies etc), but not to search for random users.

#3

robertDouglass - July 9, 2008 - 12:30

Won't you achieve your goal by simply not enabling the usersearch module?

#4

jpd972 - July 14, 2008 - 14:47

No, because I need it to be enabled for some other roles.

 
 

Drupal is a registered trademark of Dries Buytaert.