Asset WYSIWYG plugin depends on "Administer asset types" permission,

It should be

- Create asset with type Image for the Asset Image button,
- Access the assets overview page for the Asset library button.

I think it would allows contributors adding assets without giving them the possibility of managing the entire library.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

ejustice’s picture

Issue summary: View changes

There's a couple of different things things with permissions that seems a bit odd to me. First the difference between add/edit being called at admin/content/assets/add/ASSET_TYPE and permission controlled by the create asset type permission, but then the CKEditor integration calls a different path admin/assets/add/ASSET_TYPE and is controlled by the 'administer assets'. Is there a reason that these are two separate paths, and the 2 separate ways of handling permissions? Also is there a reason that asset creation is being tagged under the admin section?

I'm new to this module and we'd like to make it work for us as it's extremely helpful functionality for our non-html knowing users, but I'm going to have to make some changes to the way the permissions work since the majority of our users are not and never will be admins and shouldn't have access to the ability to create new asset types, which is also controlled by the administer assets permission.

I'll also add here that limiting the widget to the admin theme means at least for our setup that we will never be able to use the widget. I realize that this last item is some what covered in another topic , but I think it is relevant in the overall discussion of user ability to use the functionality of this module.

I'm hopeful that someone who's familiar with this module, and the coding, will chime in before long and continue the discussion because I'd like to make my code changes applicable to the whole community if possible. I'll be uploading my changes once I get them done, but wanted to try and start a discussion sooner as I know these can move very slowly with people have different schedules and level of time to commit to a project.

ejustice’s picture

Looking into this more it looks like someone has started working on this in dev and it looks promising, but even using the dev version I'm still running into issues with getting this to work via the CKEditor plugin due to some places calling asset_ASSET-TYPE where as others are just expecting ASSET-TYPE.

ejustice’s picture

This fix doesn't help anything don't use it.

ejustice’s picture

Okay so I'm not sure what state my site was in when I put those last couple of comments together. I've hidden the associated patch so hopefully it won't cause confusion for future people. I would say that the code in the dev release breaks out most of the functionality so that administer assets isn't required for actions that a non-admin user might need to perform. There is one exception to this that you have to have the asset widget module enabled to get the permission (or have administer assets) to insert into text using the CKEditor plugin.