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

UX: clarify the need for authorized extension #346

Merged
merged 4 commits into from
Dec 10, 2024
Merged

Conversation

jjaffeux
Copy link
Contributor

@jjaffeux jjaffeux commented Dec 9, 2024

When checking attach_csv in the Schedule a PM with Data Explorer results
automation script, csv has to be added to the list of authorized extensions in the site settings.

Screenshot 2024-12-09 at 17 09 14

When checking `attach_csv` in the `Schedule a PM with Data Explorer results`
 automation script, `csv` has to be added to the list of authorized extensions in the site settings.
Copy link
Member

@ZogStriP ZogStriP left a comment

Choose a reason for hiding this comment

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

Could you instead add a custom validation that will show the message if you enable this site setting but CSV isn't in the list of authorized extensions? 🤔

@jjaffeux
Copy link
Contributor Author

jjaffeux commented Dec 9, 2024

Could you instead add a custom validation that will show the message if you enable this site setting but CSV isn't in the list of authorized extensions? 🤔

ah yes good idea, forgot I added this few months ago

@jjaffeux jjaffeux requested a review from ZogStriP December 9, 2024 16:21
plugin.rb Outdated
field :attach_csv,
component: :boolean,
validator: ->(attach_csv) do
if attach_csv && !SiteSetting.authorized_extensions.split("|").include?("csv")
Copy link
Member

@ZogStriP ZogStriP Dec 9, 2024

Choose a reason for hiding this comment

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

I think we also need to handle the * which allows for "all" extensions.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

oh didn't know we do this...

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@ZogStriP ok I added the * case thanks

@jjaffeux jjaffeux requested a review from ZogStriP December 9, 2024 21:06
@jjaffeux jjaffeux merged commit 504f46b into main Dec 10, 2024
6 checks passed
@jjaffeux jjaffeux deleted the csv-site-setting branch December 10, 2024 10:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants