Problem/Motivation

The "access pwa" permission does not exist. But hook_install set it on anonymous users.

Steps to reproduce

Proposed resolution

Remaining tasks

User interface changes

API changes

Data model changes

Issue fork pwa-3205800

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

Grimreaper created an issue. See original summary.

grimreaper’s picture

Assigned: grimreaper » Unassigned
Status: Active » Needs review
khaled.zaidan’s picture

Yeah, I just spotted this issue now, as well.

I think it's worth implementing hook_update_N() to remove the permission with the next release.

Code is simple (I just haven't yet gotten the hang of GitLab :( ).

/**
 * Remove the non-existent 'access pwa' permission from the anonymous user role.
 */
function pwa_update_8002() {
  user_role_revoke_permissions(RoleInterface::ANONYMOUS_ID, ['access pwa']);
}
anybody’s picture

Status: Needs review » Needs work

@khaled.zaidan could you test that please and add the code to the MR?

anybody’s picture

Thanks, @khaled.zaidan for the addition, I just added it to the MR.

anybody’s picture

Status: Needs work » Needs review

@Grimreaper or @khaled.zaidan would you like to review the MR to get this fixed? :)

anybody’s picture

Priority: Normal » Major
grimreaper’s picture

Hi,

@Anybody, the MR is ok for me.

anybody’s picture

Status: Needs review » Reviewed & tested by the community

Thanks @Grimreaper then I'll merge it now.

  • Anybody committed 2a72c9dd on 8.x-1.x authored by Grimreaper
    Issue #3205800 by Anybody, khaled.zaidan: hook_install add a permission...
anybody’s picture

Status: Reviewed & tested by the community » Fixed

Status: Fixed » Closed (fixed)

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