• Welcome to the Chevereto user community!

    Here users from all over the world gather around to learn the latest about Chevereto and contribute with ideas to improve the software.

    Please keep in mind:

    • 😌 This community is user driven. Be polite with other users.
    • 👉 Is required to purchase a Chevereto license to participate in this community (doesn't apply to Pre-sales).
    • 💸 Purchase a Pro Subscription to get access to active software support and faster ticket response times.
  • Chevereto Support CLST

    Support response

    Support checklist

Make a specific admin account not see private images/albums

mAcular

Chevereto Noob
I want to edit the code to make it so a specific user account (that is also an admin) can't see private images/albums.

The reason for this is that we use the images to play certain games that require secret keeping, and if one of the players (an admin in this case) can see the private images, it ruins the fun.

I want to find wherever the code determines what kind of images to show in Recent and only show what a normal user would do. I see the code makes tons of checks on whether someone is an admin, so I figure it's there somewhere... but I'm not sure where specifically.

Thanks for your help!
 
I won’t give you the exact code for this, but I can briefly give an overview of what you'd need to add. Keep in mind, (iirc) every time you update, especially if/when to 4.0, these changes will be reverted; assuming the update modifies the file.
Also, you say
what kind of images to show in Recent
, as if you only want to hide private images and albums in the Recent listing. Assuming this is correct it may not be very effective :/

Anyways, as the Recent listing, listings in general, are generated by iterating over an array of recent images, inside of that loop (I can assume that’s the case), before the image is spat out to the user, you'd need to get the album the image is in, then run a boolean statement check if the album is private, true, or public/unlisted, false. If it were to be true, return nothing for that result, if false then let the script continue along with showing the image.

Also, before that paragraph above is executed, again, iirc in the loop, check to see if the currently logged in user matches a certain ID, if true proceed with the paragraph above, if false continue normally as the script would.
 
Back
Top