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
@@ -7,7 +7,7 @@ require_once(get_langfile_path());
$userid = $CURUSER['id'];
$pagerParams = [];
if (!empty($_GET['userid'])) {
if (get_user_class() < $viewhistory_class && $_GET['userid'] != $CURUSER['id']) {
if (!user_can('viewhistory') && $_GET['userid'] != $CURUSER['id']) {
permissiondenied($viewhistory_class);
}
$userid = $_GET['userid'];