silverstripe / silverstripe-asset-admin

Silverstripe assets gallery for asset management
BSD 3-Clause "New" or "Revised" License
19 stars 78 forks source link

fix: expose ShowInSearch field in access UI #1399

Closed wilr closed 7 months ago

wilr commented 10 months ago

Upgrading from SilverStripe 3 to SilverStripe 5 it appears the ShowInSearch field is no longer displayed in the UI.

The File record still contains this data and the implementation was to match Page instances which contain the 'Show in search' option to CMS editors.

Issue

GuySartorelli commented 9 months ago

There's something odd happening with the behat tests... can you please rebase your PR to see if that resolves it?

wilr commented 9 months ago

Rebased now.

GuySartorelli commented 9 months ago

This PR doesn't seem to fix it - I still can't see the ShowInSearch field when editing a file in the asset admin: image

Can you please advise if there's some additional steps I need to take, or if I'm looking in the wrong place, etc?

wilr commented 9 months ago

@GuySartorelli should be under 'Permissions'

GuySartorelli commented 9 months ago

Oh, interesting. Was it under "permissions" in CMS 3? That doesn't seem like an intuitive place for it, but if that's where it was in CMS 3 then I'd be okay with it.

Please add an exception for Folder - there is a comment in the $db definition that says it shouldn't be inherited for folder, so we shouldn't show the field for folders.

wilr commented 9 months ago

@GuySartorelli Done added a check to exclude folder.

GuySartorelli commented 9 months ago

Awesome, thanks for making that change. Can you please also answer the question from my previous comment?

Was it under "permissions" in CMS 3? That doesn't seem like an intuitive place for it, but if that's where it was in CMS 3 then I'd be okay with it.

GuySartorelli commented 9 months ago

Can you please resolve the behat failures, and also respond to my question in the previous comments?

wilr commented 9 months ago

Can you please resolve the behat failures, and also respond to my question in the previous comments?

Not sure about 3 but I think it's fine under Permissions as it relates to some form of Permission (is it permitted to be in search).

GuySartorelli commented 9 months ago

Permissions is more about user permissions than what the record is "permitted" to do. I wouldn't like to make a precedent that this sort of thing is a "permission".

If this is where it was for CMS 3 then I'm fine with it. If it wasn't there in CMS 3 or we can't verify one way or another, please move it out of permissions.

GuySartorelli commented 8 months ago

This pull request hasn't had any activity for a while. If you're still interested in having this merged, can you please either move it out of permissions or else validate where it was in CMS 3? If there's no more action after a few weeks I will close the PR, and you can reopen it when you're ready to work on it again.

wilr commented 8 months ago

Hi @GuySartorelli happy to move it out to main. In this 3 build there were no tabs. Everything is under 'Main'.

GuySartorelli commented 7 months ago

Sounds good - when that change is made, I'll be happy to re-review and merge.

wilr commented 7 months ago

@GuySartorelli done.