Posted by gjerdery on January 26, 2009 at 8:04pm
Jump to:
| Project: | Notify |
| Version: | 5.x-1.2 |
| Component: | Code |
| Category: | bug report |
| Priority: | normal |
| Assigned: | Unassigned |
| Status: | closed (fixed) |
Issue Summary
When logged in as a user given the role of administrator, not UID #1, I am unable to access the "My Notifications" tab (http://example.com/mirror/user/13/notify). This functionality was available in 5.x-1.x-dev (2008-Sept-3).
Logged in as user #1 does give me access to this page.
Comments
#1
look at:
http://drupal.org/node/300280
#2
Thanks, I had previously applied the patch noted at #300280: My Settings / Notification Settings page, which did correct the issue of the error message appearing on "My Notification" pages. The issue I'm reporting is different. In previous versions of the the module, I have been able to login with an account that had been granted "administer Notify" permission, and view the individual settings of my users. While I can still do this if logged in as UID 1, I'd like to do be able to have that ability be tied to the "administer Notify" permission for other site administrators, as needed.
#3
I have this problem, too: Only user 1 can change other people's settings, even if the permissions are set to allow some role to do it.
#4
Subscribe
Having same problem in 6.x...
#5
In order to allow users with 'administer notify' permissions to access the user profile Notify Settings form, the permission check in notify_user_settings_form(), which looks like this:
/*** Menu callback; show user notification options.
*/
function notify_user_settings_form(&$form_state, $arg) {
global $user;
if ($user->uid != $arg->uid && $user->uid != 1) {
drupal_access_denied();
return;
}
[snip]
should read:
/**
* Menu callback; show user notification options.
*/
function notify_user_settings_form(&$form_state, $arg) {
global $user;
if ($user->uid != $arg->uid && !user_access('administer notify')) {
drupal_access_denied();
return;
}
[snip]
This is true of both 5.x and 6.x branches. I can't roll a proper patch right now. Anyone else care to take on this issue for both 5.x and 6.x branches?
Here's the output of diff -uw
--- notify.module.original 2010-01-30 14:19:33.000000000 -0800+++ notify.module 2010-01-30 14:39:53.000000000 -0800
@@ -220,7 +220,7 @@
*/
function notify_user_settings_form(&$form_state, $arg) {
global $user;
- if ($user->uid != $arg->uid && $user->uid != 1) {
+ if ($user->uid != $arg->uid && !user_access('administer notify')) {
drupal_access_denied();
return;
}
#6
#7
I see that this is fixed in the -dev branches. Marking as fixed.
#8
Automatically closed -- issue fixed for 2 weeks with no activity.