forked from kevinowino869/mitrobill
Admin Permisions
This commit is contained in:
@ -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
|
||||
];
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user