-
-
Notifications
You must be signed in to change notification settings - Fork 282
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
MBS-13108: Require relationship editor, not admin, privs for attributes #3116
Draft
reosarevok
wants to merge
9
commits into
metabrainz:master
Choose a base branch
from
reosarevok:MBS-13108
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
The attributes are rendered in Attribute, these are only a few extra headers/columns for some types.
This removes the info that is mostly useless for people without editing rights (such as edit links) but displays everything else. Row ids are not removed since documenting these on the site is apparently helpful for people putting together SQL queries (this has been requested). Since this is visible to users, translations are brought back.
This seems a lot more consistent than having them in two places.
Since this is no longer admin-only, there's no reason all of this should live inside /admin folders. Use l_admin for admin-facing strings only.
This reduces code reuse to some degree. We could make further changes to also generalize part of the tables for each model, but I'm not sure it's worth the effort. Additionally, this shows a proper translatable title for each attribute type, since we'll display them to users now. Only Language and Script were translated before.
This splits the list in two, one for entity types and one for everything else. It also sorts them by the (translated) names of the attribute types, rather than by the static model name.
This is not the index for an attribute, it's the list of all attributes. Consistent with RelationshipTypesList for reltypes.
Uses the existing code for attributes, since these are basically the same as entity types already. Also allows users to see them and their descriptions, once we add them.
There's no real reason this should be locked behind account_admin. It has nothing to do with accounts nor private data, and a lot to do with schema / style, which is what we generally use relationship_editor for (not just relationships but also genres, instruments).
reosarevok
force-pushed
the
MBS-13108
branch
from
December 14, 2023 10:39
5f8fe4f
to
dae4f44
Compare
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Implement MBS-13108
Description
There's no real reason editing attributes such as activating languages or adding entity types should be locked behind
account_admin
. It has nothing to do with accounts nor private data, and a lot to do with schema / style, which is what we generally userelationship_editor
for (not just relationships but also genres, instruments).Testing
Edited the test requiring
account_admin
to requirerelationship_editor
instead.Notes
On top of #3115