From 817f1846ed9e3006e48dd7398fd537fa75cc545a Mon Sep 17 00:00:00 2001 From: Omkar Tapale Date: Sun, 5 Nov 2017 22:19:33 +0530 Subject: [PATCH] By default admin group have access to all permissions (#202) As admin user has access to all permissions, so admin group also has the same access. so needed to check if $group_par is admin or not --- application/libraries/Aauth.php | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/application/libraries/Aauth.php b/application/libraries/Aauth.php index b634f11..54dd9f2 100644 --- a/application/libraries/Aauth.php +++ b/application/libraries/Aauth.php @@ -1642,6 +1642,10 @@ class Aauth { // if group par is given if($group_par != FALSE){ + + // if group is admin group, as admin group has access to all permissions + if (strcasecmp($group_par, $this->config_vars['admin_group']) == 0) + {return TRUE;} $subgroup_ids = $this->get_subgroups($group_par); $group_par = $this->get_group_id($group_par);