Remove bypass aproval config

This commit is contained in:
Luana 2023-06-25 15:33:28 -03:00
parent 76e28b9a14
commit 65e6bae1f4
2 changed files with 1 additions and 4 deletions

View file

@ -9,7 +9,6 @@ abstract class ApprovalConfig
public const VERSION = "ext_approval_version";
public const IMAGES = "approve_images";
public const COMMENTS = "approve_comments";
public const BYPASS = "approval_bypass";
}
class Approval extends Extension
@ -23,7 +22,6 @@ class Approval extends Extension
$config->set_default_bool(ApprovalConfig::IMAGES, false);
$config->set_default_bool(ApprovalConfig::COMMENTS, false);
$config->set_default_bool(ApprovalConfig::BYPASS, false);
Image::$bool_props[] = "approved";
}
@ -32,7 +30,7 @@ class Approval extends Extension
{
global $user, $config;
if ($config->get_bool(ApprovalConfig::IMAGES) && $config->get_bool(ApprovalConfig::BYPASS) && $user->can(Permissions::BYPASS_IMAGE_APPROVAL)) {
if ($config->get_bool(ApprovalConfig::IMAGES) && $user->can(Permissions::BYPASS_IMAGE_APPROVAL)) {
self::approve_image($event->image->id);
}
}

View file

@ -47,7 +47,6 @@ class ApprovalTheme extends Themelet
{
$sb = $event->panel->create_new_block("Approval");
$sb->add_bool_option(ApprovalConfig::IMAGES, "Posts: ");
$sb->add_bool_option(ApprovalConfig::BYPASS, "<br>Enable Bypass (if user has permission): ");
}
public function display_admin_form()