BuddyDev

Search

Replies

  • Participant
    Level: Initiated
    Posts: 2
    Greg Johncock on #30271

    Hi Ravi,

    With the setup on our site, users are assigned 2 galleries when they register. 1 gallery that can be seen by logged in users and 1 gallery that can be seen by friends only. We do not allow them to edit or delete the galleries. To enable this functionality we had to customise the permissions file.

    So the issue for us is that the code in the “exclude hidden” function requires that a user has permission to delete a gallery as a condition to be able to see the hidden images…

    Line 79: class-mpp-moderator-hooks.php
    if ( mpp_user_can_delete_gallery( $gallery->id, get_current_user_id() ) ) {

    Im wondering if this condition should be “mpp_user_can_delete_media”? I dont know how having permission to delete a gallery relates to moderation of images. Having permission to delete an image as the condition would be more relatable.

    Anyways, for our purposes we have commented out this “if” condition and now have the functionality we require.

    On another note. We had to make several edits on the permissions file to achieve the level of control we need over the editing/deleting galleries and images. I was surprised that these permissions are hard coded rather than being able to configure them in the plugin settings.

    Cheers

    Greg J

  • Participant
    Level: Initiated
    Posts: 2
    Greg Johncock on #30253

    Hi Ravi,

    Thanks for the prompt response. I will investigate further and get back to you.

    Cheers

    Greg J