Skip to Content Skip to Menu

CB Gallery

7 years 5 months ago #288751 by Andromeda57
CB Gallery was created by Andromeda57
Hey guys,

is there a way to realize the following situation in cb gallery:

Moderators should be able to upload files to the cb gallery of a user. But the user should not be able to do the same, or at least, the user should not be able to delete the uploaded files.. ?!?


Thanks a lot

Tobias

Please Log in or Create an account to join the conversation.

  • krileon
  • krileon
  • ONLINE
  • Posts: 68605
  • Thanks: 9108
  • Karma: 1434
7 years 5 months ago #288755 by krileon
Replied by krileon on topic CB Gallery
Just change the create access parameter globally or for individual media types. This is done on a global scale within CB Gallery plugin parameters or on an individual gallery scale within the profile gallery tab for example. For delete and edit permissions there's no parameter for that as you're uploading on their behalf so they can still manage their own gallery entries. The only way to stop that is to upload from backend with their asset, but with your user id as the owner.

An alternative is to use a gallery fieldtype and specify a custom asset, which might work for your needs to prevent allowing them to have ownership rights to whatever is uploaded. More specifically the asset could be something like "files.[user_id]", but I haven't tested that scenario to see if the profile owner is still made the media owner (it's likely they are).


Kyle (Krileon)
Community Builder Team Member
Before posting on forums: Read FAQ thoroughly + Read our Documentation + Search the forums
CB links: Documentation - Localization - CB Quickstart - CB Paid Subscriptions - Add-Ons - Forge
--
If you are a Professional, Developer, or CB Paid Subscriptions subscriber and have a support issue please always post in your respective support forums for best results!
--
If I've missed your support post with a delay of 3 days or greater and are a Professional, Developer, or CBSubs subscriber please send me a private message with your thread and will reply when possible!
--
Please note I am available Monday - Friday from 8:00 AM CST to 4:00 PM CST. I am away on weekends (Saturday and Sunday) and if I've missed your post on or before a weekend after business hours please wait for the next following business day (Monday) and will get to your issue as soon as possible, thank you.
--
My role here is to provide guidance and assistance. I cannot provide custom code for each custom requirement. Please do not inquire me about custom development.

Please Log in or Create an account to join the conversation.

7 years 5 months ago - 7 years 5 months ago #288775 by Andromeda57
Replied by Andromeda57 on topic CB Gallery
Thanks for your fast reply.

In the plugin should be a code like "if the owner himself is watching then show menu to edit or delete file"...

Isn't it possible to comment that out? Where can i find this?

Or is it possible to change the owner for all uploaded files to some special user?


Thanks

Tobias
Last edit: 7 years 5 months ago by Andromeda57.

Please Log in or Create an account to join the conversation.

  • krileon
  • krileon
  • ONLINE
  • Posts: 68605
  • Thanks: 9108
  • Karma: 1434
7 years 5 months ago #288777 by krileon
Replied by krileon on topic CB Gallery
Edit and delete permissions are strictly based off the person being the owner of the media entry. In this case, even when creating on the users behalf on frontend, the profile owner is always the owner of the media entry. Using a custom gallery via the gallery fieldtype maybe able to workaround that check.

Yes, there is if checks for this permission, but it's all throughout CB Gallery and this is no simple means of taking away edit or delete permissions from the media owner.

The only way to have what you're wanting is for the gallery entries to display on their profile, but ensure they're not the owner of those gallery entries. This maybe doable by having the gallery asset specific to their profile, but with the owner being the moderator. As explained above this might work fine using the gallery fieldtype with asset set to something like files.[user_id].


Kyle (Krileon)
Community Builder Team Member
Before posting on forums: Read FAQ thoroughly + Read our Documentation + Search the forums
CB links: Documentation - Localization - CB Quickstart - CB Paid Subscriptions - Add-Ons - Forge
--
If you are a Professional, Developer, or CB Paid Subscriptions subscriber and have a support issue please always post in your respective support forums for best results!
--
If I've missed your support post with a delay of 3 days or greater and are a Professional, Developer, or CBSubs subscriber please send me a private message with your thread and will reply when possible!
--
Please note I am available Monday - Friday from 8:00 AM CST to 4:00 PM CST. I am away on weekends (Saturday and Sunday) and if I've missed your post on or before a weekend after business hours please wait for the next following business day (Monday) and will get to your issue as soon as possible, thank you.
--
My role here is to provide guidance and assistance. I cannot provide custom code for each custom requirement. Please do not inquire me about custom development.

Please Log in or Create an account to join the conversation.

7 years 5 months ago #288779 by Andromeda57
Replied by Andromeda57 on topic CB Gallery
Hey, thanks, This works quite good so far...

Would it be possible to set always the same user id as default instead of the user id of the profile owner? Or to set the user id of the user who is uploading a file or watching the profile?

What i mean is, we use [user_id].. Is there a value possible like "always user id xx" or "user id of the user who is uploading the file or wachting the profile" ?


Thanks a lot.

Tobias

Please Log in or Create an account to join the conversation.

  • krileon
  • krileon
  • ONLINE
  • Posts: 68605
  • Thanks: 9108
  • Karma: 1434
7 years 5 months ago #288782 by krileon
Replied by krileon on topic CB Gallery
Don't understand what you're asking. The [user_id] substitution should be of the user you're viewing otherwise try [cb:userdata field="user_id" user="#displayed" /]. The purpose is to make the gallery unique to the profile you're viewing, but it doesn't have to be and you can specify whatever asset you want. The asset simply determines the location of the gallery basically.


Kyle (Krileon)
Community Builder Team Member
Before posting on forums: Read FAQ thoroughly + Read our Documentation + Search the forums
CB links: Documentation - Localization - CB Quickstart - CB Paid Subscriptions - Add-Ons - Forge
--
If you are a Professional, Developer, or CB Paid Subscriptions subscriber and have a support issue please always post in your respective support forums for best results!
--
If I've missed your support post with a delay of 3 days or greater and are a Professional, Developer, or CBSubs subscriber please send me a private message with your thread and will reply when possible!
--
Please note I am available Monday - Friday from 8:00 AM CST to 4:00 PM CST. I am away on weekends (Saturday and Sunday) and if I've missed your post on or before a weekend after business hours please wait for the next following business day (Monday) and will get to your issue as soon as possible, thank you.
--
My role here is to provide guidance and assistance. I cannot provide custom code for each custom requirement. Please do not inquire me about custom development.

Please Log in or Create an account to join the conversation.

Moderators: beatnantkrileon
Powered by Kunena Forum

Facebook Twitter LinkedIn