Refactoring user permissions

This commit is contained in:
xiaomlove
2022-08-20 19:11:28 +08:00
parent 3046837576
commit b79762686a
73 changed files with 945 additions and 326 deletions
+196
View File
@@ -0,0 +1,196 @@
<?php
return [
'torrent-approval' => [
'text' => 'Approval Torrent',
'desc' => 'Allow, Deny, or mark as unreviewed',
],
'defaultclass' => [
'text' => 'Default Class',
'desc' => ' Class upon registration',
],
'staffmem' => [
'text' => 'Staff Member',
'desc' => 'Classes considered as staff members, e.g. can view staffbox',
],
'newsmanage' => [
'text' => 'News Management',
'desc' => 'Add new, edit, delete news',
],
'newfunitem' => [
'text' => 'Post funbox item',
'desc' => "Post new funbox items and edit own's funbox items",
],
'funmanage' => [
'text' => 'Funbox Management',
'desc' => "Edit, delete, ban anyone's funbox items",
],
'sbmanage' => [
'text' => 'Shoutbox Management',
'desc' => 'Delete messages in shoutbox and helpbox',
],
'pollmanage' => [
'text' => 'Poll Management',
'desc' => 'Add new, edit, delete polls',
],
'applylink' => [
'text' => 'Apply for Links',
'desc' => 'Apply for links on main page',
],
'linkmanage' => [
'text' => 'Link Management',
'desc' => ' Add new, edit, delete links',
],
'postmanage' => [
'text' => 'Forum Post Management',
'desc' => 'Edit, delete, move, stick, lock forum posts',
],
'commanage' => [
'text' => 'Comment Management',
'desc' => 'Edit, delete comments of torrents, offers',
],
'forummanage' => [
'text' => 'Forum Management',
'desc' => 'Add new, edit, delete, move forums',
],
'viewuserlist' => [
'text' => 'View User List',
'desc' => 'View, search user list',
],
'torrentmanage' => [
'text' => 'Torrent Management',
'desc' => 'Edit, delete torrents, excluding setting torrent sticky or on promotion',
],
'torrentsticky' => [
'text' => 'Torrent Sticky',
'desc' => ' Set torrents sticky',
],
'torrentonpromotion' => [
'text' => 'Torrent on Promotion',
'desc' => 'Set torrents on promotion',
],
'torrent_hr' => [
'text' => 'Set Torrent H&R',
'desc' => '.Set torrent join the H&R inspect',
],
'askreseed' => [
'text' => 'Ask for reseed',
'desc' => 'Ask for reseed when torrents are dead',
],
'viewnfo' => [
'text' => 'View NFO',
'desc' => 'View NFO files',
],
'torrentstructure' => [
'text' => 'View Torrent Structure',
'desc' => 'View structure of torrent files',
],
'sendinvite' => [
'text' => 'Send Invite',
'desc' => 'Send invitation of membership to others',
],
'viewhistory' => [
'text' => 'View History',
'desc' => "View other's comment and post history",
],
'topten' => [
'text' => 'View Topten',
'desc' => 'View Top Ten',
],
'log' => [
'text' => 'View General Log',
'desc' => 'View general log, excluding confidential log',
],
'confilog' => [
'text' => 'View Confidential Log',
'desc' => 'View confidential log, e.g. site setting changes',
],
'userprofile' => [
'text' => "View User's Confidential Profile",
'desc' => "View user's confidential profile, e.g. IP address, Email address",
],
'torrenthistory' => [
'text' => "View User's Torrent History",
'desc' => "View user's torrent history, e.g. downloaded torrents.Valid only when user's setting for privacy level is not 'strong'"
],
'prfmanage' => [
'text' => "User's General Profile Management",
'desc' => " Change user's profile, excluding crucial ones e.g. email, username, uploaded and downloaded amount, bonus"
],
'cruprfmanage' => [
'text' => "User's Crucial Profile Management",
'desc' => "Change user's crucial profile, excluding donation (only Staff Leader can manage donation)",
],
'uploadsub' => [
'text' => 'Upload subtitle',
'desc' => 'Upload subtitles for torrents',
],
'delownsub' => [
'text' => "Delete own's subtitle",
'desc' => 'Delete subtitles uploaded by oneself',
],
'submanage' => [
'text' => 'Subtitle Management',
'desc' => 'Delete any subtitle',
],
'updateextinfo' => [
'text' => 'Update External Info',
'desc' => 'Update outdated external infomation, e.g. IMDb info',
],
'viewanonymous' => [
'text' => 'View Anonymous',
'desc' => 'View who anonymous one is',
],
'beanonymous' => [
'text' => 'Be Anonymous',
'desc' => 'Upload torrents, subtitles anonymously',
],
'addoffer' => [
'text' => 'Add Offer',
'desc' => ' Add offers to upload',
],
'offermanage' => [
'text' => 'Offer Management',
'desc' => 'Allow, Edit, Delete offer',
],
'upload' => [
'text' => 'Upload Torrent',
'desc' => 'Upload torrents to Torrents section',
],
'uploadspecial' => [
'text' => 'Upload Special Torrent',
'desc' => 'Upload torrents to Special section',
],
'view_special_torrent' => [
'text' => 'View Special Torrent',
'desc' => 'View torrents in Special section',
],
'movetorrent' => [
'text' => 'Move Torrent',
'desc' => 'Move torrents between sections',
],
'chrmanage' => [
'text' => 'Chronicle Management',
'desc' => 'Add, edit, delete chronicle',
],
'viewinvite' => [
'text' => 'View Invite',
'desc' => "View user's invite history",
],
'buyinvite' => [
'text' => 'Buy Invites',
'desc' => 'Buy invites at bonus center',
],
'seebanned' => [
'text' => 'See Banned Torrents',
'desc' => 'See and download banned torrents',
],
'againstoffer' => [
'text' => 'Vote Against Offers',
'desc' => 'Vote against offers',
],
'userbar' => [
'text' => 'Allow Userbar',
'desc' => ' Get his userba',
],
];
+1 -1
View File
@@ -17,7 +17,7 @@ return [
'attendance_card' => 'Attend card',
'props' => 'Props',
],
'class_name' => [
'class_names' => [
\App\Models\User::CLASS_VIP => 'Vip',
\App\Models\User::CLASS_RETIREE => 'Retiree',
\App\Models\User::CLASS_UPLOADER => 'Uploader',
+196
View File
@@ -0,0 +1,196 @@
<?php
return [
'torrent-approval' => [
'text' => '审核种子',
'desc' => '通过种子、拒绝种子、或将种子标记为未审',
],
'defaultclass' => [
'text' => '默认等级',
'desc' => '注册时获得的等级',
],
'staffmem' => [
'text' => '管理组成员',
'desc' => '被认为是管理组成员的等级,如可以查看管理组信箱',
],
'newsmanage' => [
'text' => '管理最近消息',
'desc' => '添加、编辑、删除最近消息',
],
'newfunitem' => [
'text' => '发布趣味盒内容',
'desc' => '允许发布新的趣味盒内容及编辑自己发布的趣味盒内容',
],
'funmanage' => [
'text' => '管理趣味盒',
'desc' => '编辑、删除、禁止任何人发布的趣味盒内容',
],
'sbmanage' => [
'text' => '管理群聊区',
'desc' => '删除群聊区和救助区的信息',
],
'pollmanage' => [
'text' => '管理投票',
'desc' => '添加、编辑、删除投票',
],
'applylink' => [
'text' => '申请链接',
'desc' => '申请在首页的友情链接',
],
'linkmanage' => [
'text' => '管理友情链接',
'desc' => '添加、编辑、删除友情链接',
],
'postmanage' => [
'text' => '管理论坛帖子',
'desc' => '编辑、删除、移动、置顶、锁定论坛帖子',
],
'commanage' => [
'text' => '管理评论',
'desc' => '编辑、删除种子和候选的评论',
],
'forummanage' => [
'text' => '管理论坛版块',
'desc' => '添加、编辑、删除、移动论坛版块',
],
'viewuserlist' => [
'text' => '查看用户列表',
'desc' => '查看、搜索用户列表',
],
'torrentmanage' => [
'text' => '管理种子',
'desc' => '编辑、删除种子,但不能将种子设为置顶或促销',
],
'torrentsticky' => [
'text' => '设定种子置顶',
'desc' => '将种子设为置顶',
],
'torrentonpromotion' => [
'text' => '设定种子为促销',
'desc' => '将种子设为促销',
],
'torrent_hr' => [
'text' => '设定种子 H&R',
'desc' => '将种子设置为参与 H&R 考察',
],
'askreseed' => [
'text' => '请求续种',
'desc' => '当种子断种时请求续种',
],
'viewnfo' => [
'text' => '查看NFO',
'desc' => '查看NFO文件',
],
'torrentstructure' => [
'text' => '查看种子结构',
'desc' => '查看种子文件的结构',
],
'sendinvite' => [
'text' => '发送邀请',
'desc' => '发送加入网站的邀请函给其他人',
],
'viewhistory' => [
'text' => '查看历史记录',
'desc' => '查看其他用户的评论和帖子历史记录',
],
'topten' => [
'text' => '查看排行榜',
'desc' => '查看排行榜',
],
'log' => [
'text' => '查看一般日志',
'desc' => '查看一般日志,不能查看机密日志',
],
'confilog' => [
'text' => '查看机密日志',
'desc' => '查看机密日志,如站点设定更改',
],
'userprofile' => [
'text' => '查看用户机密档案',
'desc' => '查看用户的机密档案,如IP地址,邮箱地址',
],
'torrenthistory' => [
'text' => '查看用户种子历史记录',
'desc' => '查看用户的种子历史记录,如下载种子的历史记录。只有用户的隐私等级没有设为’强‘时才生效',
],
'prfmanage' => [
'text' => '管理用户基本档案',
'desc' => '改变用户的基本档案,但不能改变其中重要的项目,如邮箱地址、用户名、上传量、下载量、魔力值数',
],
'cruprfmanage' => [
'text' => '管理用户重要档案信息',
'desc' => '改变用户所有档案信息,除了捐赠信息外(只有主管能管理捐赠信息)',
],
'uploadsub' => [
'text' => '上传字幕',
'desc' => '上传种子对应的字幕',
],
'delownsub' => [
'text' => '删除自己的字幕',
'desc' => '删除自己上传的字幕',
],
'submanage' => [
'text' => '管理字幕',
'desc' => '删除任何字幕',
],
'updateextinfo' => [
'text' => '更新外部信息',
'desc' => '更新外部信息,如IMDb信息',
],
'viewanonymous' => [
'text' => '查看匿名者',
'desc' => '查看匿名者的真实身份',
],
'beanonymous' => [
'text' => '作为匿名',
'desc' => '在发布种子、上传字幕时选择匿名',
],
'addoffer' => [
'text' => '添加候选',
'desc' => '允许发起候选',
],
'offermanage' => [
'text' => '管理候选',
'desc' => '通过、编辑、删除候选',
],
'upload' => [
'text' => '发布种子',
'desc' => '发布种子到种子区',
],
'uploadspecial' => [
'text' => '发布种子至特别区',
'desc' => '发布种子到特别区',
],
'view_special_torrent' => [
'text' => '查看特别区种子',
'desc' => '查看特别区种子',
],
'movetorrent' => [
'text' => '移动种子',
'desc' => '将种子在各区间移动',
],
'chrmanage' => [
'text' => '管理史册',
'desc' => '添加、编辑、删除史册内容',
],
'viewinvite' => [
'text' => '查看邀请',
'desc' => '查看用户的邀请历史记录',
],
'buyinvite' => [
'text' => '购买邀请',
'desc' => '允许在魔力值中心购买邀请',
],
'seebanned' => [
'text' => '查看被禁止的种子',
'desc' => '查看、下载被禁止的种子',
],
'againstoffer' => [
'text' => '对候选投反对票',
'desc' => '对候选投反对票',
],
'userbar' => [
'text' => '允许个性条',
'desc' => '允许用户使用个性条',
],
];
+196
View File
@@ -0,0 +1,196 @@
<?php
return [
'torrent-approval' => [
'text' => '審核種子',
'desc' => '通過種子、拒絕種子、或將種子標記為未審',
],
'defaultclass' => [
'text' => '預設等級',
'desc' => '註冊時獲得的等級',
],
'staffmem' => [
'text' => '管理組成員',
'desc' => '被認為是管理組成員的等級,如可以檢視管理組郵箱',
],
'newsmanage' => [
'text' => '管理最近訊息',
'desc' => '添加、編輯、移除最近訊息',
],
'newfunitem' => [
'text' => '發布趣味盒內容',
'desc' => '允許發布新的趣味盒內容及編輯自己發布的趣味盒內容',
],
'funmanage' => [
'text' => '管理趣味盒',
'desc' => '編輯、移除、禁止任何人發布的趣味盒內容',
],
'sbmanage' => [
'text' => '管理群聊區',
'desc' => '移除群聊區和救助區的資訊',
],
'pollmanage' => [
'text' => '管理投票',
'desc' => '添加、編輯、移除投票',
],
'applylink' => [
'text' => '申請鏈結',
'desc' => '申請在首頁的友情鏈結',
],
'linkmanage' => [
'text' => '管理友情鏈結',
'desc' => '添加、編輯、移除友情鏈結',
],
'postmanage' => [
'text' => '管理論壇帖子',
'desc' => '編輯、移除、移動、置頂、鎖定論壇帖子',
],
'commanage' => [
'text' => '管理評論',
'desc' => '編輯、移除種子和候選的評論',
],
'forummanage' => [
'text' => '管理論壇版塊',
'desc' => '添加、編輯、移除、移動論壇版塊',
],
'viewuserlist' => [
'text' => '檢視用戶清單',
'desc' => '檢視、搜索用戶清單',
],
'torrentmanage' => [
'text' => '管理種子',
'desc' => '編輯、移除種子,但無法將種子設為置頂或促銷',
],
'torrentsticky' => [
'text' => '設定種子置頂',
'desc' => '將種子設為置頂',
],
'torrentonpromotion' => [
'text' => '設定種子為促銷',
'desc' => '將種子設為促銷',
],
'torrent_hr' => [
'text' => '設定種子 H&R',
'desc' => '將種子設置為參與 H&R 考察',
],
'askreseed' => [
'text' => '要求續種',
'desc' => '當種子斷種時要求續種',
],
'viewnfo' => [
'text' => '檢視NFO',
'desc' => '檢視NFO檔案',
],
'torrentstructure' => [
'text' => '檢視種子架構',
'desc' => '檢視種子檔案的架構',
],
'sendinvite' => [
'text' => '傳送邀請',
'desc' => '傳送加入網站的邀請函給其他人',
],
'viewhistory' => [
'text' => '檢視曆史記錄',
'desc' => '檢視其他用戶的評論和帖子曆史記錄',
],
'topten' => [
'text' => '檢視排行榜',
'desc' => '檢視排行榜',
],
'log' => [
'text' => '檢視一般日誌',
'desc' => '檢視一般日誌,無法檢視機密日誌',
],
'confilog' => [
'text' => '檢視機密日誌',
'desc' => '檢視機密日誌,如網站設定變更',
],
'userprofile' => [
'text' => '檢視用戶機密檔案',
'desc' => '檢視用戶的機密檔案,如IP位址,郵箱位址',
],
'torrenthistory' => [
'text' => '檢視用戶種子曆史記錄',
'desc' => '檢視用戶的種子曆史記錄,如下載種子的曆史記錄。只有用戶的隱私等級沒有設為’強‘時才生效',
],
'prfmanage' => [
'text' => '管理用戶基本檔案',
'desc' => '改變用戶的基本檔案,但無法改變其中重要的項目,如郵箱位址、用戶名、上傳量、下載量、魔力值數',
],
'cruprfmanage' => [
'text' => '管理用戶重要檔案資訊',
'desc' => '改變用戶所有檔案資訊,除了捐贈資訊外(只有主管能管理捐贈資訊)',
],
'uploadsub' => [
'text' => '上傳字幕',
'desc' => '上傳種子對應的字幕',
],
'delownsub' => [
'text' => '移除自己的字幕',
'desc' => '移除自己上傳的字幕',
],
'submanage' => [
'text' => '管理字幕',
'desc' => '移除任何字幕',
],
'updateextinfo' => [
'text' => '更新外部資訊',
'desc' => '更新外部資訊,如IMDb資訊',
],
'viewanonymous' => [
'text' => '檢視匿名者',
'desc' => '檢視匿名者的真實身份',
],
'beanonymous' => [
'text' => '作為匿名',
'desc' => '在發布種子、上傳字幕時選取匿名',
],
'addoffer' => [
'text' => '添加候選',
'desc' => '允許發起候選',
],
'offermanage' => [
'text' => '管理候選',
'desc' => '通過、編輯、移除候選',
],
'upload' => [
'text' => '發布種子',
'desc' => '發布種子到種子區',
],
'uploadspecial' => [
'text' => '發布種子至特別區',
'desc' => '發布種子到特別區',
],
'view_special_torrent' => [
'text' => '查看特別區種子',
'desc' => '查看特別區種子',
],
'movetorrent' => [
'text' => '移動種子',
'desc' => '將種子在各區間移動',
],
'chrmanage' => [
'text' => '管理史冊',
'desc' => '添加、編輯、移除史冊內容',
],
'viewinvite' => [
'text' => '檢視邀請',
'desc' => '檢視用戶的邀請曆史記錄',
],
'buyinvite' => [
'text' => '購買邀請',
'desc' => '允許在魔力值中心購買邀請',
],
'seebanned' => [
'text' => '檢視被禁止的種子',
'desc' => '檢視、下載被禁止的種子',
],
'againstoffer' => [
'text' => '對候選投反對票',
'desc' => '對候選投反對票',
],
'userbar' => [
'text' => '允許個性條',
'desc' => '允許用戶使用個性條',
],
];
+1 -1
View File
@@ -17,7 +17,7 @@ return [
'attendance_card' => '補簽卡',
'props' => '道具',
],
'class_name' => [
'class_names' => [
\App\Models\User::CLASS_VIP => '貴賓',
\App\Models\User::CLASS_RETIREE => '養老族',
\App\Models\User::CLASS_UPLOADER => '發布員',
@@ -49,6 +49,7 @@
<td></td>
</tr>
@endif
{!! do_action('user_detail_rows', $record->id, 'admin') !!}
<tr>
<th>{{__('label.user.invite_by')}}</th>
<td>{{$record->inviter->username ?? ''}}</td>