mirror of
https://github.com/BookStackApp/BookStack.git
synced 2025-10-25 06:37:36 +03:00
Permissions: Updated usage of controller methods to use enum
This commit is contained in:
@@ -5,6 +5,7 @@ namespace BookStack\Settings;
|
||||
use BookStack\Activity\ActivityType;
|
||||
use BookStack\App\AppVersion;
|
||||
use BookStack\Http\Controller;
|
||||
use BookStack\Permissions\Permission;
|
||||
use BookStack\Users\Models\User;
|
||||
use Illuminate\Http\Request;
|
||||
|
||||
@@ -24,7 +25,7 @@ class SettingController extends Controller
|
||||
public function category(string $category)
|
||||
{
|
||||
$this->ensureCategoryExists($category);
|
||||
$this->checkPermission('settings-manage');
|
||||
$this->checkPermission(Permission::SettingsManage);
|
||||
$this->setPageTitle(trans('settings.settings'));
|
||||
|
||||
return view('settings.categories.' . $category, [
|
||||
@@ -41,7 +42,7 @@ class SettingController extends Controller
|
||||
{
|
||||
$this->ensureCategoryExists($category);
|
||||
$this->preventAccessInDemoMode();
|
||||
$this->checkPermission('settings-manage');
|
||||
$this->checkPermission(Permission::SettingsManage);
|
||||
$this->validate($request, [
|
||||
'app_logo' => ['nullable', ...$this->getImageValidationRules()],
|
||||
'app_icon' => ['nullable', ...$this->getImageValidationRules()],
|
||||
|
||||
Reference in New Issue
Block a user