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

MBS-13108: Require relationship editor, not admin, privs for attributes #3116

Draft
wants to merge 9 commits into
base: master
Choose a base branch
from

Conversation

reosarevok
Copy link
Member

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 use relationship_editor for (not just relationships but also genres, instruments).

Testing

Edited the test requiring account_admin to require relationship_editor instead.

Notes

On top of #3115

@reosarevok reosarevok added the QoL Non-urgent quality of life improvements label Dec 4, 2023
@reosarevok reosarevok marked this pull request as draft December 4, 2023 19:44
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).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
QoL Non-urgent quality of life improvements
Projects
None yet
1 participant