Zepi/Core/AccessControl/src/Entity/AccessEntity.php
public function hasAccess($accessLevel)
    {
        foreach ($this->permissions as $permission) {
            /**
             * If the user has the \Globa\* access level he can
             * do everything
             */
            if ($permission == '\\Global\\*') {
                return true;
            }
            
            if ($permission == $accessLevel) {
                return true;
            }
            
            // If there is a star in the permission and everything before 
            // the star is equal with the access level, the user has access
            // to the given access level.
            $posStar = strpos($permission, '*');
            if ($posStar !== false) {
                $startPermission = substr($permission, 0, $posStar);
                $startAccessLevel = substr($accessLevel, 0, $posStar);
                
                if ($startPermission == $startAccessLevel) {
                    return true;
                }
            } 
        }
    
        return false;
    }
public function hasAccess($accessLevel)
    {
        foreach ($this->permissions as $permission) {
            /**
             * If the user has the \Globa\* access level he can
             * do everything
             */
            if ($permission == '\\Global\\*') {
                return true;
            }
            
            if ($permission == $accessLevel) {
                return true;
            }
            
            // If there is a star in the permission and everything before 
            // the star is equal with the access level, the user has access
            // to the given access level.
            $posStar = strpos($permission, '*');
            if ($posStar !== false) {
                $startPermission = substr($permission, 0, $posStar);
                $startAccessLevel = substr($accessLevel, 0, $posStar);
                
                if ($startPermission == $startAccessLevel) {
                    return true;
                }
            } 
        }
    
        return false;
    }
public function hasAccess ( $ accessLevel ) { foreach ( $ this -> permissions as $ permission ) { /**
             * If the user has the \Globa\* access level he can
             * do everything
             */ if ( $ permission == '\\Global\\*' ) { return true ; } if ( $ permission == $ accessLevel ) { return true ; } // If there is a star in the permission and everything before  // the star is equal with the access level, the user has access // to the given access level. $ posStar = strpos ( $ permission , '*' ) ; if ( $ posStar !== false ) { $ startPermission = substr ( $ permission , 0 , $ posStar ) ; $ startAccessLevel = substr ( $ accessLevel , 0 , $ posStar ) ; if ( $ startPermission == $ startAccessLevel ) { return true ; } } } return false ; }
Returns true if the access entity has access to
the given permission access level

@access public
@param string $accessLevel
@return boolean
Returns true if the access entity has access to the given permission access level