Problem/Motivation

If we add the site settings type field to the site settings overview page view then users with user roles other than administrator are not able to see the site setting type because admin_permission for site setting type entity is set to "administer site configuration" but we can't give this permission to users other then administrators as it will have security implications.

Steps to reproduce

  1. Edit the site settings view(/admin/structure/views/view/site_settings).
  2. Add site settings type field in the fields and save the view.
  3. Go to site settings overview with a user logged in with content editor user role.
  4. User can't see the site settings type field value.

Proposed resolution

We should change the admin permission in SiteSettingEntityType to access site settings overview permission similar to the admin_permission as used in the SiteSettingGroupEntityType

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

sahilgidwani created an issue. See original summary.

sahilgidwani’s picture

Assigned: sahilgidwani » Unassigned
Status: Active » Needs review

I have committed proposed changes and created a merge request.

scott_euser’s picture

Status: Needs review » Needs work

Thanks for raising. However we should not give create, update, and delete access. Only view access should be allowed. So admin permission attribute would need to be removed and replaced with an access handler so existing permission can be returned for all but view.

Thanks!

scott_euser’s picture

I would also be okay if you wanted to create a seperate permission for configuring like 'administer site settings types' but this would then also need an update hook to maintain the status quo for existing installs.

scott_euser’s picture

Version: 2.0.0-alpha4 » 2.0.x-dev
Category: Bug report » Feature request
Status: Needs work » Fixed

Okay implemented my feedback.

Status: Fixed » Closed (fixed)

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