method accessExists documentation in bbn\User\Permissions
Checks if the given permission corresponds to real file in mvc/public.
function(string $id_perm)
{
$real = false;
$parents = array_reverse($this->opt->parents($id_perm));
$access = $this->opt->fromCode('access', 'permissions', 'appui');
if (in_array($access, $parents, true)) {
$path_to_file = $this->opt->toPath($id_perm, '', $access);
if (substr($path_to_file, -1) === '/') {
return is_dir(Mvc::getAppPath().'mvc/public/'.substr($path_to_file, 0, -1));
}
return file_exists(Mvc::getAppPath().'mvc/public/'.$path_to_file.'.php');
}
else {
$plugin_name = $this->opt->code($parents[2]);
if ($this->opt->code($parents[1]) === 'appui') {
$plugin_name = 'appui-'.$plugin_name;
}
$path_to_file = $this->opt->toPath($id_perm, '', $parents[4]);
if (substr($path_to_file, -1) === '/') {
return is_dir(Mvc::getPluginPath($plugin_name).'mvc/public/'.substr($path_to_file, 0, -1));
}
return file_exists(Mvc::getPluginPath($plugin_name).'mvc/public/'.$path_to_file.'.php');
}
return false;
}
Checks if the given permission corresponds to real file in mvc/public. BBN is a suite of PHP and JS libraries and VueJS components - all open-source! bbn.io, build applications, the quick way
This website uses cookies to ensure you get the best experience on our website.
© 2011-2025
BBN Solutions