separate route permission + token manage

This commit is contained in:
xiaomlove
2025-04-17 18:59:03 +07:00
parent 263901bc54
commit 432c57f886
27 changed files with 203 additions and 54 deletions
+3 -4
View File
@@ -5,9 +5,6 @@ namespace App\Enums\Permission;
enum PermissionEnum: string {
case UPLOAD_TO_SPECIAL_SECTION = 'uploadspecial';
case BE_ANONYMOUS = 'beanonymous';
case TORRENT_LIST = 'torrent:list';
case TORRENT_VIEW = 'torrent:view';
case TORRENT_VIEW_SPECIAL = 'view_special_torrent';
case TORRENT_SET_HR = 'torrent_hr';
case TORRENT_SET_PRICE = 'torrent-set-price';
@@ -16,6 +13,8 @@ enum PermissionEnum: string {
case TORRENT_APPROVAL_ALLOW_AUTOMATIC = 'torrent-approval-allow-automatic';
case TORRENT_SET_SPECIAL_TAG = 'torrent-set-special-tag';
case UPLOAD = 'upload';
case MANAGE_USER_BASIC_INFO = "prfmanage";
case MANAGE_USER_CONFIDENTIAL_INFO = "cruprfmanage";
case VIEW_USER_CONFIDENTIAL_INFO = "userprofile";
case USER_VIEW = "user:view";
}
@@ -0,0 +1,10 @@
<?php
namespace App\Enums\Permission;
enum RoutePermissionEnum: string {
case TORRENT_LIST = 'torrent:list';
case TORRENT_VIEW = 'torrent:view';
case TORRENT_UPLOAD = 'torrent:upload';
case USER_VIEW = "user:view";
}