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

elek’s picture

gjerdery’s picture

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.

toddwoof’s picture

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.

mcurry’s picture

Subscribe
Having same problem in 6.x...

mcurry’s picture

Status: Needs review » Active

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;
   }
mcurry’s picture

Status: Active » Needs review
mcurry’s picture

Status: Active » Fixed

I see that this is fixed in the -dev branches. Marking as fixed.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.