I'm working on a project with multiple back-end users, each having their own private folder (start node) in the media library. Now, I would also need a (read-only) public repository which is accessible to all users.
Has any of you ever implemented permissions or extended the media library like this before? Perhaps a customized media picker can do the trick?
I'd love to hear your experiences and suggestions.
Set all users start media folder to Images but using event handler if user logged in name does not match named folder dont show obviously public must always show.
I'd go with creating your own loadMedia class and just override the Render() method instead of building the event handlers to check permissions. On the other hand, this would require a db update to load your new loadMedia class instead of the default one.
Or, if you don't want changes to the current db data, create another section, and use that section to load media items for the users handling the permission stuff. And give users access to that section instead of media.
Or, another idea, use media section for public stuff and build a simple custom section for private stuff.
You could extend the media section with another tree 'public' that is basicly a copy of the media tree but with it's root set to your public media root. Don't think it would be that hard, just need to take a look at the current media tree node
Extending the media library
Hi everyone,
I'm working on a project with multiple back-end users, each having their own private folder (start node) in the media library. Now, I would also need a (read-only) public repository which is accessible to all users.
Has any of you ever implemented permissions or extended the media library like this before? Perhaps a customized media picker can do the trick?
I'd love to hear your experiences and suggestions.
Thanks!
Lennart
Lennart,
Maybe you could use tree events code so that for specific media folders (specified in config file) you dont get create / delete options?
See http://our.umbraco.org/wiki/reference/api-cheatsheet/using-applicationbase-to-register-events/event-examples/remove-context-menu-items for more information on removing context menu items.
Regards
Ismail
Hi Ismail,
Removing the context menu items would indeed restrict the usage in the media library as needed.
I am not sure how the public repository can be shared though, as users are already restricted to their private one:
- Public repository
- Private repositories
--- User A (start node for user A)
--- User B (start node for user B)
--- User C (start node for user C)
In this setup, users cannot access the public repository however.
Any ideas? :s
Lennart,
Then you could re organise the folders e.g
Images
Joe Bloggs
Jane Bloggs
Public
Set all users start media folder to Images but using event handler if user logged in name does not match named folder dont show obviously public must always show.
Regards
Ismail
I'd go with creating your own loadMedia class and just override the Render() method instead of building the event handlers to check permissions. On the other hand, this would require a db update to load your new loadMedia class instead of the default one.
Or, if you don't want changes to the current db data, create another section, and use that section to load media items for the users handling the permission stuff. And give users access to that section instead of media.
Or, another idea, use media section for public stuff and build a simple custom section for private stuff.
Oh, what flexibility you have there.
Cheers,
/Dirk
Hey guys,
Thanks for your suggestions.
I will have a look into the media event handlers & loadMedia class and see what fits best.
@Dirk:
Currently the project is still in dev, so data is not an issue.
We have considered creating a custom media section, although we rather not create a second media section if its not necessary :)
Will keep you posted.
Thanks!
Lennart
Comment author was deleted
You could extend the media section with another tree 'public' that is basicly a copy of the media tree but with it's root set to your public media root. Don't think it would be that hard, just need to take a look at the current media tree node
Hi Tim,
Wonderful idea! Will post some code when I have it working, cheers! :-)
It's been a while but I decided to package up this functionality
http://our.umbraco.org/projects/backoffice-extensions/publicmediatree
@Lennart Stoop
Thanks for your awesome package
Hi Sam, glad to hear it works for you as well! :-)
Grtz
L
is working on a reply...