- global $security_areas, $security_groups, $security_headings;
+ global $security_areas, $security_groups, $security_headings, $path_to_root;
// Transition code:
// db was not yet upgraded after source update to v.2.2
// give enough access for admin user to continue upgrade
if (!isset($security_groups) || !isset($security_headings)) {
echo "<center><br><br><font size='5' color='red'><b>";
echo _('Before software upgrade you have to include old $security_groups and $security_headings arrays from old config.php file to the new one.');
// Transition code:
// db was not yet upgraded after source update to v.2.2
// give enough access for admin user to continue upgrade
if (!isset($security_groups) || !isset($security_headings)) {
echo "<center><br><br><font size='5' color='red'><b>";
echo _('Before software upgrade you have to include old $security_groups and $security_headings arrays from old config.php file to the new one.');
if (isset($security_groups)) {
return $this->company == 0 &&
in_array(20, $security_groups[$this->access]);
if (isset($security_groups)) {
return $this->company == 0 &&
in_array(20, $security_groups[$this->access]);
// only first registered company has site admin privileges
return $code && in_array($code, $this->role_set)
// only first registered company has site admin privileges
return $code && in_array($code, $this->role_set)