Administer site configuration permission is required to access privatemsg

Created on 25 February 2024, 10 months ago
Updated 29 February 2024, 10 months ago

Problem/Motivation

All privatemsg Permission to authenticated users granted, still access denied, not visible in profile

Steps to reproduce

Install the module, grant permissions as in image attached

Proposed resolution

In order to allow users to read, write messages had to grant 'administer site configuration'

Remaining tasks

Add required permission in Readme or display at install/enable
Better - no need to add any admin permissions

User interface changes

API changes

Data model changes

Spent a lot of time searching but only found old versions privatemsg issues access related and a lot related to similar module Private Message (private-message) which has a very annoying problem ( installed on a fresh D10 and uninstall it right away; I use this lovely module and very happy with it on D6 and D7, didn't like at all the Private Message (private-message) interface and display)
Rebuilt permissions - same access denied
Finally the report log showed the "requirement" "The 'administer site configuration' permission is required."
From the sometimes very useful report log:
Path: /user/3/messages. Drupal\Core\Http\Exception\CacheableAccessDeniedHttpException: The 'administer site configuration' permission is required. in Drupal\Core\Routing\AccessAwareRouter->checkAccess() (line 115 of /mysite/drupal/web/core/lib/Drupal/Core/Routing/AccessAwareRouter.php).

Is this normal?

As far as o remember I never ever allowed any "administer" permissions to "normal/Authenticated", users - and using drupal since version 5
Interesting to note that could not find any "issue" about this anywhere. It should be in the readme or displayed after module is enabled, as I saw modules doing.
Thanks

πŸ’¬ Support request
Status

Closed: works as designed

Version

2.0

Component

Code

Created by

πŸ‡ΊπŸ‡ΈUnited States quchidru

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

  • Issue created by @quchidru
  • Path: /user/3/messages
    It looks like you are trying to view a specific users messages and that would require Administrator access unless you are currently logged in as user 3.

    Instead try browsing to just www.yoursite.com/messages(obviously replacing yoursite with your domain)? That should eliminate the need for Administrator access and attempt only access to the logged in users messages.

  • πŸ‡ΊπŸ‡ΈUnited States quchidru

    I was expecting that too, but no. I logged in as a "normal" authenticated user (uid 3) and "Messages" menu link not visible
    Only by admin, so I saw that access error only as user 3 or another "normal" user
    Meanwhile I did a new fresh D10 install and privatemsg - exactly the same error and missing Messages link in my account
    Thanks

  • ivnish Kazakhstan

    @joshua-jake, I think you are right

    @quchidru what do you mean "missing Messages link in my account" ?

  • I think I understand where some of @quchidru's confusion is coming from. The Admin user has a tab on the users view page that says "Messages" that comes from the all_privatemsg_thread view in the All messages another user display.

    This display does require Administer site configuration to view and the path is - /user/%user/messages. And this is where his original error/complain is coming from because it's the only link he has found on the user interface to access the messages.

    The All messages Display of the same view is what the end user should be viewing instead with the path of /messages and this only requires the permisison of "Write and view messages". The problem I believe @quchidru is talking about is that there is no menu access for this link for the non-admin user. He is looking for a "Private Message" link to appear somewhere on their profile so that can quickly get to the /messages view.

    Am I tracking now with your actual problem @quchidru?

  • πŸ‡ΊπŸ‡ΈUnited States quchidru

    HI You may be onto something, however I cannot test it now since i uninstalled it ( rules are not supported on D10 version)
    Too bad - Loved this module functionality and interface on D7 but had to say goodbye for now
    I may try it again on test site
    Thanks

  • Status changed to Closed: works as designed 10 months ago
Production build 0.71.5 2024