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

fix: expose ShowInSearch field in access UI #1399

Merged
merged 1 commit into from
Nov 19, 2023
Merged

fix: expose ShowInSearch field in access UI #1399

merged 1 commit into from
Nov 19, 2023

Conversation

wilr
Copy link
Member

@wilr wilr commented Sep 11, 2023

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
Copy link
Member

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

@wilr
Copy link
Member Author

wilr commented Sep 15, 2023

Rebased now.

@GuySartorelli
Copy link
Member

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
Copy link
Member Author

wilr commented Sep 19, 2023

@GuySartorelli should be under 'Permissions'

@GuySartorelli
Copy link
Member

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
Copy link
Member Author

wilr commented Sep 19, 2023

@GuySartorelli Done added a check to exclude folder.

@GuySartorelli
Copy link
Member

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
Copy link
Member

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

@wilr
Copy link
Member Author

wilr commented Oct 4, 2023

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
Copy link
Member

GuySartorelli commented Oct 4, 2023

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
Copy link
Member

GuySartorelli commented Oct 30, 2023

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
Copy link
Member Author

wilr commented Oct 31, 2023

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

@GuySartorelli
Copy link
Member

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

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.
@wilr
Copy link
Member Author

wilr commented Nov 19, 2023

@GuySartorelli done.

Copy link
Member

@GuySartorelli GuySartorelli left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, will merge on green.

@GuySartorelli GuySartorelli merged commit fdeacbe into silverstripe:2 Nov 19, 2023
12 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants