I'm pretty sure this is a bug... :)

I've only given a particular role on a site any permissions for the Messaging or Notifications modules (eg administer notifications, manage own subscriptions), but when logged in with an account that only has the "authenticated" role it still shows the "Messaging settings" fieldset in the user account editing form.

This is a problem for me as at the moment only administrators of the site (which have their own "admin" role) should be able to do anything with the Messaging module.

It looks changing messaging.module line 125 from
if ($category == 'account' && ($list = messaging_method_list($user))) {
to
if ($category == 'account' && ($list = messaging_method_list($user)) && user_access("maintain own subscriptions")) {
is the fix.

I'll submit a patch if this is in fact a bug and this is the right solution.

Comments

jdln’s picture

I have the same issue. Can someone confirm the change to the messaging.module is the way to go?
Thanks

jeni_dc’s picture

I agree that the suggested modifications above would be a good idea. I ended up using http://drupal.org/project/formfilter to get rid of the fieldset instead of modifying the module. Kind of a heavy handed approach, though, that adds it's own set of issues.

slimgrin’s picture

OliverColeman's suggested change worked for me. Thanks!

andrebonfanti’s picture

subscribe

JoeMcGuire’s picture

Version: 6.x-2.3 » 6.x-4.x-dev
Status: Active » Needs review
StatusFileSize
new1.28 KB

Glad I wasn't the only wanting this feature!

I have used the same method and only added a the permission to hook_perm() also.

I called the permission 'manage own send method'.

Patch attached for 6.x-4.x but the code is the same for earlier versions and should work there also.

avpaderno’s picture

Issue summary: View changes
Status: Needs review » Closed (outdated)

I am closing this issue, as Drupal 6 is now not supported.