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

Add an image size voter #6646

Merged
merged 5 commits into from Jan 9, 2024
Merged

Conversation

aschempp
Copy link
Member

@contao/developers what I find confusing is that a user can have access to only a limited number of image sizes, but they can still see all images sizes. They can also edit all images sizes. But only if they add a new image size, it is added to their user permission to make it accessible in the widget dropdown. Is that something we intentionally do?

@aschempp aschempp added this to the 5.3 milestone Dec 20, 2023
@aschempp aschempp requested a review from a team December 20, 2023 11:52
@aschempp aschempp self-assigned this Dec 20, 2023
@leofeyer
Copy link
Member

Is that something we intentionally do?

Probably not. 🙈 But @ausi might know.

@ausi
Copy link
Member

ausi commented Dec 21, 2023

AFAIK we only have permissions per image size for being accessible in the widget dropdown. If a user has access to the image sizes admin view is not related to that. For the admin view we do not have specific permissions per image size. I think this is correct and the image-sizes-widget-dropdown-permission should not get mixed with the general CRUD-permissions for tl_image_sizes.

Is that something we intentionally do?

Probably not. 🙈 But @ausi might know.

This feature is from @qzminski and @aschempp see contao/core-bundle#319 so they should know the intention best ☺️

@aschempp
Copy link
Member Author

yeah, I was just confused by the fact that a user might not have access to an image size in the widget, but can edit it. So a user can not see an option in the list, but can duplicated said option and then have access to the new one. Not sure that's really intended?

For example with forms, the user permission to limit the forms affects both the list in the back end as well as the widget in the form element dropdown.

@leofeyer
Copy link
Member

So a user can not see an option in the list, but can duplicated said option and then have access to the new one. Not sure that's really intended?

It is not. We should fix this IMHO.

@aschempp
Copy link
Member Author

aschempp commented Jan 6, 2024

It is not. We should fix this IMHO.

I thought so, too. However, there is currently no permission to add or delete an image size, like there ususally is for e.g. news archives. Which means if a user is given access to the image size theme module, they should be able to do anything to that (CRUD). Which ultimately means they should have all image sizes… 🤔

@aschempp aschempp marked this pull request as ready for review January 6, 2024 12:10
@leofeyer leofeyer added the up for discussion Issues and PRs which will be discussed in our monthly Mumble calls. label Jan 6, 2024
@aschempp aschempp removed the up for discussion Issues and PRs which will be discussed in our monthly Mumble calls. label Jan 6, 2024
@aschempp
Copy link
Member Author

aschempp commented Jan 6, 2024

I have created a new issue (#6693) for the open question. This PR should be RTM and implements the current behaviour.

@leofeyer leofeyer changed the title Added image size voter Add an image size voter Jan 9, 2024
@leofeyer leofeyer merged commit 026374e into contao:5.x Jan 9, 2024
17 checks passed
@leofeyer
Copy link
Member

leofeyer commented Jan 9, 2024

Thank you @aschempp.

@aschempp aschempp deleted the feature/image-sizes-voter branch January 9, 2024 13:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants