mirror of
https://github.com/hotspotbilling/phpnuxbill.git
synced 2025-08-04 02:04:53 +02:00
Admin Permisions
This commit is contained in:
parent
375403135e
commit
a7502aa8fb
16 changed files with 150 additions and 69 deletions
|
@ -18,8 +18,9 @@ $menu_registered = array();
|
|||
* @param string icon from ion icon, ion-person, only for AFTER_
|
||||
* @param string label for showing label or number of notification or update
|
||||
* @param string color Label color
|
||||
* @param string auth ['SuperAdmin', 'Admin', 'Report', 'Agent', 'Sales'] will only show in this user, empty array for all users
|
||||
*/
|
||||
function register_menu($name, $admin, $function, $position, $icon = '', $label = '', $color = 'success')
|
||||
function register_menu($name, $admin, $function, $position, $icon = '', $label = '', $color = 'success', $auth = [])
|
||||
{
|
||||
global $menu_registered;
|
||||
$menu_registered[] = [
|
||||
|
@ -29,7 +30,8 @@ function register_menu($name, $admin, $function, $position, $icon = '', $label =
|
|||
"icon" => $icon,
|
||||
"function" => $function,
|
||||
"label" => $label,
|
||||
"color" => $color
|
||||
"color" => $color,
|
||||
"auth" => $auth
|
||||
];
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue