Permissions unassigned when using multiple windows/tabs on same session

Created on 6 August 2015, over 9 years ago
Updated 27 July 2023, over 1 year ago

Ran into a problem where permissions were getting completely unassigned.

The scenario is this:

1. Open one window/tab and filter permissions for any one role and all modules.
2. Open another window/tab and filter permissions for another one role and all modules.
3. Save permissions on the 1st window/tab.

All permissions for the role in the 2nd window/tab are now completely unassigned.

It appears the use of session variables in the module can cause this unfortunate permissions wipe out.

Of course, this can be avoided by not using multiple windows/tabs on the same session. Like opening one in incognito instead can avoid this issue.

πŸ› Bug report
Status

Fixed

Version

1.0

Component

Code

Created by

πŸ‡ΊπŸ‡ΈUnited States jh sio

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

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

  • πŸ‡»πŸ‡³Vietnam ducviethaboo Ha Noi

    With multilingual site. Validate the form with $submit_button['#value']->render() == 'Save permissions' is not working because in another language, we will have another value for button. So I think it's better if give the submit button a value that we can detect when click this button, and validate the form with this value, somthing like that:
    alter form:
    $form["actions"]["submit"]['#saved_permission'] = TRUE;
    and validate function will be:

    $submit_button = $form_state->getTriggeringElement();
      // no need to run this validation when submitting filter changes.
      if (isset($submit_button['#saved_permission'])) {
  • πŸ‡ΊπŸ‡ΈUnited States justcaldwell Austin, Texas

    Hello @ducviethaboo!

    This issue has been closed for quite a while. If you have a new/related problem to report, please create a new issue β†’ .

Production build 0.71.5 2024