Given some array with user rights (For example):
$perms = array("group_1_edit","group_2_delete", "group_3*"); On the page, a function is set that checks for access by flag
function check_perm($req_flag){ global $perms; if(in_array($req_flag, $perms)){ return true; } else { return false; } } On the page for testing, just if with a function
<?php if(check_perm(group_3_edit)){?> Доступ разрешен <?php } ?> How to verify that if a user has a group_x * flag (x is some value), then we provide access to all flags that start with group_x (group_x_ any_continued)?