Hide media for certain users whilst allowing them to select an image
In our website we allow our clients employees to edit their own profile pages. One of the properties of the page is an avatar to show which sector of the business they work in.
The avatar is selected using a Media Picker which seems to need the user to have access to the Media section to work. However we've found those users are going in to the media section and editing the avatar files. Obviously we don't want them to do this, just be able to select an image.
Anyone have any ideas how we can stop these users actually accessing the media section but still allow them to choose an image from there.
1. You could use an "Upload" field instead. That would let them upload an image directly on the content node, instead of picking it from media.
2. You could set their "top node" in media to a limited folder, so that they dont screw other stuff up. You might also be able to add a BeforeSave event, that prevents that type of users from saving media nodes.
Is the issue that you want to supply them with a defined set of avatars to choose from, and nothing else? Maybe a the uComponents package has a datatype that will let you do that...
Yes, we want them to select from a defined list of avatars. We have set the start node folder in the permissions but that hasn't stopped at least 2 people from renaming the avatars and one of them from uploading their own image.
I'm looking at the beforesave as I use that elsewhere. The only issue is that you can't seem to provide a custom message when the save is canceled.
Or you could roll your own entirely. But take a look at the projects section. There are lots of "Picker" type datatypes, so I'm guessing one of them will suit your needs.
Could you elaborate on why the uComponents datatype would not fit your needs?
Couple of issues. We may, in the future want non-admins to be able to edit the avatar images and we don't want them to have access to the developer section. And the images were a bit big for the drop down to look good (I'm calling them avatars but they're not really).
I've been looking at rolling my own, taking the umbraco media picker and removing the permission check but I really have no idea where to start :/
Hide media for certain users whilst allowing them to select an image
In our website we allow our clients employees to edit their own profile pages. One of the properties of the page is an avatar to show which sector of the business they work in.
The avatar is selected using a Media Picker which seems to need the user to have access to the Media section to work. However we've found those users are going in to the media section and editing the avatar files. Obviously we don't want them to do this, just be able to select an image.
Anyone have any ideas how we can stop these users actually accessing the media section but still allow them to choose an image from there.
Hi
I see two options.
1. You could use an "Upload" field instead. That would let them upload an image directly on the content node, instead of picking it from media.
2. You could set their "top node" in media to a limited folder, so that they dont screw other stuff up. You might also be able to add a BeforeSave event, that prevents that type of users from saving media nodes.
Is the issue that you want to supply them with a defined set of avatars to choose from, and nothing else? Maybe a the uComponents package has a datatype that will let you do that...
Yes, we want them to select from a defined list of avatars. We have set the start node folder in the permissions but that hasn't stopped at least 2 people from renaming the avatars and one of them from uploading their own image.
I'm looking at the beforesave as I use that elsewhere. The only issue is that you can't seem to provide a custom message when the save is canceled.
Maybe this datatype would be a solution:
http://ucomponents.codeplex.com/wikipage?title=ImageDropDown&referringTitle=Documentation
Allows you to upload some images, and let the user select one.
I had a look at beforesave but it seems canceling the save doesn't work. The file is still changed :(
It doesn't look like that uComponents datatype will work either.
Here is another option for a datatype that might help you.
http://umbracoscdatatypes.codeplex.com/
Or you could roll your own entirely. But take a look at the projects section. There are lots of "Picker" type datatypes, so I'm guessing one of them will suit your needs.
Could you elaborate on why the uComponents datatype would not fit your needs?
Couple of issues. We may, in the future want non-admins to be able to edit the avatar images and we don't want them to have access to the developer section. And the images were a bit big for the drop down to look good (I'm calling them avatars but they're not really).
I've been looking at rolling my own, taking the umbraco media picker and removing the permission check but I really have no idea where to start :/
is working on a reply...