allow image owner to view their unapproved images

This commit is contained in:
jellykells 2021-12-23 21:45:44 -06:00
parent bed0db40d7
commit bdea799766

View file

@ -191,7 +191,7 @@ class Approval extends Extension
{
global $user, $config;
if ($config->get_bool(ApprovalConfig::IMAGES) && $image->approved===false && !$user->can(Permissions::APPROVE_IMAGE)) {
if ($config->get_bool(ApprovalConfig::IMAGES) && $image->approved===false && !$user->can(Permissions::APPROVE_IMAGE) && $user->id!==$image->owner_id) {
return false;
}
return true;