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
+1 -1
View File
@@ -87,7 +87,7 @@ $limit .= $showrows;
//approval status
$approvalStatusNoneVisible = get_setting('torrent.approval_status_none_visible');
if ($approvalStatusNoneVisible == 'no' && get_user_class() < $staffmem_class) {
if ($approvalStatusNoneVisible == 'no' && !user_can('staffmem')) {
$where .= ($where ? " AND " : "") . "torrents.approval_status = " . \App\Models\Torrent::APPROVAL_STATUS_ALLOW;
}