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

Only change Publication Flags that Users have Permissions for #1769

Merged
merged 1 commit into from
Feb 4, 2024

Conversation

Masterjun3
Copy link
Collaborator

@Masterjun3 Masterjun3 commented Feb 4, 2024

Resolves #1767 .
With permissions involved we can't just clear the whole list and then set those selected. We need to only remove those the user can edit, and then only set those the user can edit and has selected.


Also, it seems these previous two lines were doing the exact same thing. This stuff looks redundant.

publication.PublicationFlags.Clear();

_db.PublicationFlags.RemoveRange(
			_db.PublicationFlags.Where(pf => pf.PublicationId == publication.Id));

And this is still being done for the Publication Tags (instead of the Flags).

@adelikat adelikat merged commit 63c4f50 into main Feb 4, 2024
1 check failed
@adelikat adelikat deleted the publicationflags-edit-permissionfix branch February 4, 2024 20:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants