• Welcome to the Chevereto User Community!

    Here, users from all over the world come together to learn, share, and collaborate on everything related to Chevereto. It's a place to exchange ideas, ask questions, and help improve the software.

    Please keep in mind:

    • This community is user-driven. Always be polite and respectful to others.
    • Support development by purchasing a Chevereto license, which also gives you priority support.
    • Go further by joining the Community Subscription for even faster response times and to help sustain this space
  • Chevereto Support CLST

    Support response

    Support checklist

    • Got a Something went wrong message? Read this guide and provide the actual error. Do not skip this.
    • Confirm that the server meets the System Requirements
    • Check for any available Hotfix - your issue could be already reported/fixed
    • Read documentation - It will be required to Debug and understand Errors for a faster support response

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