2

I have a 100 articles, and with for each article 1 author. Authors can only edit their own entries.

Every article as an Asset directory called "Photo Album". This works fine. Beautiful, even.

The problem is that, when I enable

- View source
--- Upload files

.... every author from the group has access to the entire Assets, Photo Album folder, globally, so to all folders. I need to enable the "View source" part because they also need to be able to add a Caption and Copyright notice for each picture.

Under Sections, one could finegrain this

- Edit other authors’ entries
- Edit other authors’ drafts

But not with Assets.

Does anyone have a fix for this?

I don't really expect my editors to start sabotaging each others's articles but it's not very elegant, and mistakes can be made, esp with 100 directories in there.

Thanks

3

I didn't know this yet, but it seem like you can't do Quick Editing asset meta fields from the Edit Entry view for asset sources you don't have editing permission.

In your situation this get's into the way of setting things up like Jamie Wade suggested. But it's actually quite logical: no editing permissions means no permissions anywhere. So what you actually need is to have this setting to be split into:

  • "Edit assets from Assets view"
  • "Edit assets form Edit Entry view"

You could try to convince P&T of the usefulness of such a permission setting by adding a feature request.

In the meantime you could use a workaround and simply hide the assets panel completely for all users but admins for example. You would give your users the permission to edit all assets from all entries, but they won't find a way to do so as they can't access the UI for it.

To do this you can make use of the new modifyCpNav hook in a small businesslogic plugin.

public function modifyCpNav(&$nav)
{
    if (!craft()->userSession->isAdmin())
    {
        unset($nav['assets']);
    }
}
| improve this answer | |
3

As far as I know you can't restrict users to certain folders in the Assets section of Craft, you can only set their permissions for the whole Asset Source.

The only workaround I can think of for you would be to actually remove Authors permissions on the Assets section of Craft completely.

That way the only way they can make Asset updates is when they are editing an entry, and with the permissions structure you have they can only edit entries they have made themselves anyway.

As they don't have access to other people's entries, they can't edit the assets on them.

It may not be the most elegant approach but it would give you the functionality you are looking for. I'm sure others might have a better way of handling it though. Hope that helps a little.

| improve this answer | |
  • Thanks Jamie. Good to read confirmation, and yes: that's what I had first, having it just disabled. The fact that they can not edit/delete assets, is not great, but doable to live with. More problematic is that they then can not edit custom fields after uploading an asset; meaning: can not add copyright & caption info. Which is also important. It's like choosing between to 2 bad options. – tom Mar 26 '15 at 10:51
  • @tom They will be able to edit/delete assets, but only for the entries they have created themselves. My suggestion was to remove their permissions to the Assets section (so it would no longer appear in the grey top bar). This would mean they can still add/delete assets as they wish, but that would have to be done when they are editing an entry. I may have mis-understood your question but I'm sure that will work how you are asking. – Jamie Wade Mar 26 '15 at 10:54
  • with "Entries they created" you mean the article entry itself, or the asset entry? Because if I create the article entry for them, assign them as author, they can't manage anything of the assets; except uploading and selecting... no quick editing. At least, that's how it looks here now. – tom Mar 26 '15 at 11:17
  • @tom Assets and entries are very different things. Entries are, as you say the articles on the site. Assets are files you can add to the articles, for example images -- Apologies, I did just update my answer as you can't actually delete assets from the asset field modal window, you can only remove them from the asset field -- If you can live without authors actually being able to delete images from the asset source themselves, then my method is something to consider. It'd be interesting to see what someone else comes back with. – Jamie Wade Mar 26 '15 at 11:26
  • Yes, maybe wrong wording from me. Thanks for helping out. I double checked, even if the Author created the entry, and if he does not have edit Assets access (set in the Usergroup permissions), the author can not access the quick edit or "Editing Access Content" either... like here – tom Mar 26 '15 at 12:24

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.