Viewing 6 replies - 1 through 6 (of 6 total)
  • Plugin Author Brajesh Singh

    (@sbrajesh)

    Hi,
    Are you using any custom code or is it related to group upload?

    A User created gallery can be deleted by the user or the site admin.

    Is is giving you any error message when you try to delete using a normal account?

    Plugin Author Brajesh Singh

    (@sbrajesh)

    Oops,
    I am sorry, I misread the post earlier.

    Please give me a minute to look into the group issue.

    Thread Starter unuigbee

    (@unuigbee)

    I’m using this code you gave me to restrict members from uploading media to other members gallery.

    function mpp_custom_restrict_group_upload( $can_do, $component, $component_id, $gallery  ) {
    
    	if ( $component != 'groups' ) {
    		return $can_do;
    	}
    	//we only care about group upload
    	$gallery = mpp_get_gallery( $gallery );
    
    	if ( ! $gallery || $gallery->user_id != get_current_user_id() ) {
    		return false;//do not allow if gallery is not given
    	}
    
    	return true;//the user had created this gallery
    
    }
    add_filter( 'mpp_user_can_upload', 'mpp_custom_restrict_group_upload', 11, 4 );

    I’ll try remove this code and see if it makes a difference.

    Only the admin can delete a gallery. The user can’t delete their own gallery.

    Plugin Author Brajesh Singh

    (@sbrajesh)

    Hi,
    Thank you.
    There is no need to delete that code.
    At the moment, gallery deletion is disallowed by normal members in groups. They can delete their uploaded media from their own gallery or other user’s gallery in the group.

    We disabled it for the normal users as we did not wanted to allow people to delete galleries when there may be other’s uploaded media in it too. This is just to avoid any issue with user behavior as group galleries are collaborative galleries.

    I will be happy to make it better, please do let me know what you think should be the right approach.

    Thread Starter unuigbee

    (@unuigbee)

    Hi,

    Ok that makes sense.

    Thanks for the help.

    Plugin Author Brajesh Singh

    (@sbrajesh)

    Marking it as resolved.

    Thank you
    Brajesh

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘Members in groups can't delete their own gallery’ is closed to new replies.