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

Added an option to show file actions in media modals #471

Merged
merged 1 commit into from Aug 30, 2016
Merged

Added an option to show file actions in media modals #471

merged 1 commit into from Aug 30, 2016

Conversation

p-decoraid
Copy link

No description provided.

@owen2345
Copy link
Owner

What about to use this in permissions? (roles)

@p-decoraid
Copy link
Author

What do you mean?

@owen2345
Copy link
Owner

Like this:
2016-08-26_1927
By this way only users with that permission can show the actions.
what do you think?

@p-decoraid
Copy link
Author

I would agree if we were talking about a user's ability to create folders, but the change here is purely visual. If anything the permission should be on the action, and then the link would only be rendered if the user has the permission to do the action.

Alternatively, perhaps always showing the create folder link is a better way forward. What was the reasoning for not showing this link in the partial?

@owen2345
Copy link
Owner

owen2345 commented Aug 27, 2016

currently media actions is available in media section because that section is accessible only if you have permission to access, instead the modal media can be opened in any place with/without media permission and there is a security problem because anyone can delete files from other users.

@p-decoraid
Copy link
Author

Does the controller that permit media deletion check permissions?

@owen2345
Copy link
Owner

not yet, for now it is managed only by

@show_file_actions = true

@p-decoraid
Copy link
Author

Then perhaps the modal should be rendered if and only if the user has permissions to delete files?

@owen2345
Copy link
Owner

No, the modal is ok.
The file actions in the modal, like delete folder/file should be visible only if you have permission like this:
2016-08-26_1927
What do you think?

@p-decoraid
Copy link
Author

To be honest I am not sure, in the old camaleon version we had an "add folder" button (even though it was never used) and in the new version we don't. I need to understand file uploads and permissions better to have an informed opinion.

@owen2345 owen2345 merged commit 4a53431 into owen2345:master Aug 30, 2016
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.

3 participants