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

Make authority a unique index on modUserGroupRole #16587

Merged
merged 1 commit into from
Jul 5, 2024

Conversation

opengeek
Copy link
Member

What does it do?

Adds a unique index to the modUserGroupRole.authority field.

Why is it needed?

modUserGroupRole records are linked to ACLs via the authority value, so those MUST be unique or referential integrity is lost.

How to test

Run the transport build, execute the setup, and verify that after adding a modUserGroupRole record with a non-unique authority value, the upgrade stops with a failure describing what you need to do in order to resolve the situation before re-running the setup. After removing the non-unique record, verify that setup then runs successfully and a unique index is added to the authority column.

Related issue(s)/PR(s)

This is related to and should be adopted along with #16568 — see discussion on that PR.

@opengeek opengeek added bug The issue in the code or project, which should be addressed. area-core area-setup labels Jun 24, 2024
@opengeek opengeek added this to the v3.1.0 milestone Jun 24, 2024
@opengeek opengeek requested a review from Mark-H as a code owner June 24, 2024 21:34
@opengeek opengeek merged commit 8cd57b5 into modxcms:3.x Jul 5, 2024
4 of 5 checks passed
@opengeek opengeek deleted the unique-authority branch July 5, 2024 18:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-core area-setup bug The issue in the code or project, which should be addressed.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant