tinify / wordpress-plugin

Speed up your WordPress website. Optimize your JPEG and PNG images automatically with TinyPNG.
GNU General Public License v2.0
88 stars 36 forks source link

Limit users who can use bulk compress tools #4

Closed saeedshabani closed 9 years ago

saeedshabani commented 9 years ago

I think it's good to limit the bulk compress tools to users with manage_options capability.

middagj commented 9 years ago

Thanks for contributing. We started the plugin to transparent compress the images while uploading and added the bulk compression later to help existing WordPress installations compressing everything. We thought that if a user is allowed to upload images it should also be allowed to compress the images he previously uploaded.

What are you thoughts to make it only for users with manage_options? It will mean that the users cannot bulk select from the media library either if they are missing the manage_options capability but do have upload_files.

It was my understanding that you can specify the capability in the third argument of add_management_page and WordPress will handle the access control automatically. Is there any reason you still put in an if statement?

rolftimmermans commented 9 years ago

I'm closing this now. Feel free to reopen and comment on the questions by @middagj.