Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Check if emergency publisher role exists before changing permissions #389

Merged
merged 3 commits into from
Oct 15, 2024

Conversation

andybroomfield
Copy link
Contributor

@andybroomfield andybroomfield commented Oct 15, 2024

Fix #388

What does this change?

Fix bug reported in #386

How to test

Install 1.7.10 and then delete the emergency publisher role.
You should still be able to run the latest DB update.

How can we measure success?

Councils can install the update if they have removed the emergency publisher role.

Have we considered potential risks?

Should be minimal, role might have changed permissions that need it.

Images

n/a

Accessibility

n/a

@AWearring
Copy link
Contributor

@andybroomfield Found and fixed issues: 62f625b

@AWearring AWearring self-requested a review October 15, 2024 16:05
Copy link
Contributor

@AWearring AWearring left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tested locally and this resolves the error we were getting:

>  [notice] Update started: localgov_alert_banner_update_10002
>  [error]  Call to a member function revokePermission() on null 
>  [error]  Update failed: localgov_alert_banner_update_10002
 [error]  Update aborted by: localgov_alert_banner_update_10002 
 [error]  Finished performing updates.

@andybroomfield
Copy link
Contributor Author

Thanks @AWearring and also verified this applies the permissions to those with the emergency publisher role.

@andybroomfield andybroomfield merged commit b70ea28 into 1.x Oct 15, 2024
8 checks passed
@andybroomfield andybroomfield deleted the fix/1.x-388-emergency-publisher-role branch October 15, 2024 21:10
@andybroomfield andybroomfield mentioned this pull request Oct 15, 2024
@andybroomfield andybroomfield changed the title Check if emergency publisher role exits before changing permissions Check if emergency publisher role exists before changing permissions Oct 15, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Check the emergency role exists before revoking roles
2 participants