Problem/Motivation

In order to enable editors to add, edit and delete glossary entries, it seems like not only the appropriate permissions are needed, but also the Administer DeepL glossary entities, otherwise they don't see the menu item. We might want to change this, so editors are able to edit glossary entries while not being permitted to edit the glossary entity itself.

Comment by @mrshowerman in #3232134

Proposed resolution

  • users having one of the following permissions should be able to access the glossary overview page
    • add deepl_glossary entities
    • edit deepl_glossary entities
    • delete deepl_glossary entities
  • a new permission edit glossary entries is available, which allow users to edit the entries, but not other glossary information like name, source language, target language

Remaining tasks

  • update existing permission handling to allow users access to glossary overview page
  • add new permission edit glossary entries and update permission handling
Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

Comments

SteffenR created an issue. See original summary.

steffenr’s picture

Issue summary: View changes
steffenr’s picture

Issue summary: View changes
steffenr’s picture

Issue summary: View changes
steffenr’s picture

Issue summary: View changes
steffenr’s picture

Title: [deepL glossary] Improve permissions to access the glossary overview page » [deepL glossary] Improve permissions to access the glossary overview page/ edit glossaries entries
mrshowerman’s picture

Excellent, that's exactly what I need 👏🏼

steffenr’s picture

Title: [deepL glossary] Improve permissions to access the glossary overview page/ edit glossaries entries » Improve permissions to access the glossary overview page/ edit glossaries entries
Component: Code » tmgmt_deepl_glossary
Assigned: Unassigned » steffenr

  • SteffenR committed 9b10b10a on 2.2.x
    #3401614: Improve permission to access deepl_glossary overview/ edit...
steffenr’s picture

Assigned: steffenr » Unassigned
Status: Active » Needs review

@mrshowerman
The changes can be tested in the latest 2.2.x-dev release of the module.

I've also added a new permission access deepl_glossary overview to simplify access handling.
Two hook_update_n take care of updating existing user roles with the new permissions.
Feel free to test and give feedback.

mrshowerman’s picture

Status: Needs review » Needs work

Not sure if this is a bug or a misunderstanding on my side, but I had to grant the "administer deepl_glossary entities" permission along with "access deepl_glossary overview" and "edit deepl_glossary glossary entries" in order enable editors to access and edit glossary entries.
While editors aren't able to edit the glossary entities (which is good), I had expected that only the last two permissions would suffice, and the "administer" term sounds more powerful than what I wanted to grant them 😉

steffenr’s picture

I'll have a further look.
While testing on my local environment it was sufficient to just set access deepl_glossary overview and edit deepl_glossary glossary entries..

steffenr’s picture

@mrshowerman
Are you sure, that your permissions are configured correctly?

I just did a test on a blank D10 site with just tmgmt and tmgt_deepl installed and got access to the deepl_glossary overview page without the need of the administer permission.

The following permissions are granted to the role content_editor

  - 'access administration pages'
  - 'access content overview'
  - 'access contextual links'
  - 'access deepl_glossary overview'
  - 'access files overview'
  - 'access toolbar'
  - 'access tour'
  - 'administer url aliases'
  - 'create article content'
  - 'create page content'
  - 'create terms in tags'
  - 'create translation jobs'
  - 'create url aliases'
  - 'delete article revisions'
  - 'delete own article content'
  - 'delete own page content'
  - 'delete page revisions'
  - 'edit deepl_glossary glossary entries'
  - 'edit own article content'
  - 'edit own comments'
  - 'edit own page content'
  - 'edit terms in tags'
  - 'revert all revisions'
  - 'view all revisions'
  - 'view own unpublished content'
  - 'view the administration theme'
mrshowerman’s picture

Status: Needs work » Reviewed & tested by the community

I installed the module on another site, and there the "access overview " and "edit entries" permissions were sufficient. So it must be a different issue on the first site, will have to find out myself.

Sorry for the noise, I think this is ready.

steffenr’s picture

Status: Reviewed & tested by the community » Fixed

Thanks for testing the new functionality.
A new 2.2.0 release was just released.

Status: Fixed » Closed (fixed)

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