This commit is contained in:
NottyNoz 2023-03-21 00:31:57 -04:00 committed by Shish
parent cf9837a776
commit cf6d994de4

View file

@ -228,8 +228,8 @@ class PrivateImage extends Extension
public function onImageAddition(ImageAdditionEvent $event)
{
global $user_config;
if ($user_config->get_bool(PrivateImageConfig::USER_SET_DEFAULT)) {
global $user, $user_config;
if ($user_config->get_bool(PrivateImageConfig::USER_SET_DEFAULT) && $user->can(Permissions::SET_PRIVATE_IMAGE)) {
self::privatize_image($event->image->id);
}
}