We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent c299d17 commit 79a81a6Copy full SHA for 79a81a6
1 file changed
pfSense-pkg-API/files/usr/local/www/api/documentation/index.php
@@ -5,7 +5,9 @@
5
session_start();
6
7
# Redirect user if they do not have privilege to access this page
8
-$user_privs = get_user_privileges(getUserEntry($_SESSION["Username"]));
+$client_config =& getUserEntry($_SESSION["Username"]);
9
+$client_config = (array_key_exists('item', $client_config)) ? $client_config['item'] : $client_config;
10
+$user_privs = get_user_privileges($client_config);
11
if (!in_array("page-system-api", $user_privs) and !in_array("page-all", $user_privs)) {
12
header("Location: /");
13
exit();
0 commit comments