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

View File

@@ -25,7 +25,7 @@ $row = mysql_fetch_array($res);
if (!$row)
die();
if ($CURUSER["id"] != $row["owner"] && get_user_class() < $torrentmanage_class)
if ($CURUSER["id"] != $row["owner"] && !user_can('torrentmanage'))
bark($lang_delete['std_not_owner']);
$rt = intval($_POST["reasontype"] ?? 0);