Add fallback value to permissions check.

This commit is contained in:
Alex Tselegidis 2022-06-19 17:30:33 +01:00
parent bf78545752
commit 2e97777cad

View file

@ -52,7 +52,7 @@ if ( ! function_exists('can'))
$permissions = $CI->roles_model->get_permissions_by_slug($role_slug); $permissions = $CI->roles_model->get_permissions_by_slug($role_slug);
return $permissions[$resource][$action]; return $permissions[$resource][$action] ?? FALSE;
} }
} }