This is because we don't handle the case where the social_profile_privacy module is installed in a website that has more roles than just the default Open Social roles.

Set priority to Major because it breaks updating for anyone that has non-default roles defined.

Comments

Kingdutch created an issue. See original summary.

kingdutch’s picture

Assigned: kingdutch » Unassigned
Status: Active » Needs review
StatusFileSize
new1.17 KB

Patch attached. Pull request here: https://github.com/goalgorilla/open_social/pull/654

Instead of throwing an error we return an empty array for roles
that we don't want to explicitly grant permissions to. The users
with these roles will also inherit the permissions from the
"authenticated user" role.

This also removes the need for a special case for the administrator
role.

Passing an empty array to `user_role_grant_permissions` will not
modify any permissions.

jochemvn’s picture

Priority: Major » Normal

Reviewed and merged. Will be part of the next release of Open Social.

ps. Demoted from major > normal, since it's an experimental module

jochemvn’s picture

Status: Needs review » Fixed

  • Kingdutch committed 452e378 on 8.x-1.x
    Issue #2927442 by Kingdutch: fix undefined index in...
  • 8d6f3ca committed on 8.x-1.x
    Merge pull request #654 from goalgorilla/2927442-fix-permission-grant-...

Status: Fixed » Closed (fixed)

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