omeka / omeka-s

Omeka S is a web publication system for universities, galleries, libraries, archives, and museums. It consists of a local network of independently curated exhibits sharing a collaboratively built pool of items, media, and their metadata.
GNU General Public License v3.0
403 stars 135 forks source link

User's item default settings don't work #2166

Closed allanaaa closed 7 months ago

allanaaa commented 7 months ago

When a user has a default item template, item set(s), and site(s) for all their new items, the resource template seems to work (and automatically adds the associated class), but the default item set and default site don't automatically get set.

allanaaa commented 7 months ago

When a user has site defaults for items in their user settings, the item add tab is showing the right number of entries but they're all blank:

Screenshot 2024-03-13 at 18 34 23

If this setting is not intended to have any effect unless the user is also given a site-level permission, this seems pointless (at least to have the setting here, rather that in the site users tab).

allanaaa commented 7 months ago

When the item is saved and then edited, it changes to this:

Screenshot 2024-03-13 at 18 39 44
jimsafley commented 7 months ago

The fix-default-site-for-items branch should fix this.

allanaaa commented 7 months ago

User settings are now reflected on new items.

If the user goes to remove a site after saving the new item, they don't have the ability to do that. They can only determine the sites to add the item to at the point of creation, not in editing afterwards. Which is fine, I can just document that if you'd like.

Item sets don't have that problem (the user can remove items from the default item sets, or add more, after creation).

I realize these work differently by design, just wanted to put it out there in case some of this isn't intended.

zerocrates commented 7 months ago

Can you show a screenshot of what you're talking about with editing and not being able to remove?

In general, what they can do or not do is related to what permissions they have for the site. There are special carveouts to allow assignment to "default" sites even when the user doesn't have permission to add items to that site (so the "add all items to this site by default" setting for the site still works). I think that's what you're describing here but I'm not totally sure.

allanaaa commented 7 months ago

Yeah, that's what I was imagining. A user with no site-specific settings can still add items to their default sites - but then because they don't have site-specific settings they have no ability to remove the item after that point.

User settings are basically everything (author level):

Screenshot 2024-04-01 at 14 48 08

The item-add and -edit experience:

https://github.com/omeka/omeka-s/assets/28012148/30a449ec-a5f4-4dcb-8b99-3d91d34deec7

So yes, I guess we could change (or document) that the interface appears like you're deleting a site from an item, and it appears to save, although it won't take.

zerocrates commented 7 months ago

Hmmm, I think that's a bug.

jimsafley commented 7 months ago

~The most recent commit should allow users who can edit an item (but do not have site-specific privileges) to un-assign a site from that item.~

The most recent commit should remove unassign buttons from sites where the current user has no site-specific privileges.

allanaaa commented 7 months ago

Perfect. A user at the lower levels can't choose which of their default sites get the item at item creation, and they can't edit that list after item creation. A user with permissions for one site can modify the item viz. that site only.