Uploaded image for project: 'CiviCRM'
  1. CiviCRM
  2. CRM-21293

Adding/removing "access CiviCRM" permission doesn't hide/show CiviCRM toolbar tab in D8

    Details

    • Versioning Impact:
      Patch (backwards-compatible bug fixes)
    • Documentation Required?:
      None
    • Funding Source:
      Contributed Code
    • Verified?:
      Yes

      Description

      In Drupal 8, adding or removing the "CiviCRM: access CiviCRM" permission won't hide/show the "CiviCRM" tab in the Drupal toolbar.

      There's actually two bugs:

      1. The permission name is given case with incorrect case ("access civicrm" vs "access CiviCRM") and they are checked in case sensitive way
      2. The cache information needs to be returned always, otherwise if a user without permission visits the site first, the version without the tab will be cached and returned for all users - we at least need to say how this data varies and that's by permission (the current code had it vary per-user but that's less efficient - different users with the same permission can share the cache)

      PR coming soon!

        Attachments

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              dsnopek David Snopek
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: