src/flowcode/enlace/controller/BaseController.php
public function canAccess(array $user) {
        $can = false;
        foreach ($user["roles"] as $userRole) {
            foreach ($userRole["permissions"] as $permission) {
                if (in_array($permission, $this->permissions)) {
                    $can = true;
                    break;
                }
            }
        }
        return $can;
    }
public function canAccess(array $user) {
        $can = false;
        foreach ($user["roles"] as $userRole) {
            foreach ($userRole["permissions"] as $permission) {
                if (in_array($permission, $this->permissions)) {
                    $can = true;
                    break;
                }
            }
        }
        return $can;
    }
public function canAccess ( array $ user ) { $ can = false ; foreach ( $ user [ "roles" ] as $ userRole ) { foreach ( $ userRole [ "permissions" ] as $ permission ) { if ( in_array ( $ permission , $ this -> permissions ) ) { $ can = true ; break ; } } } return $ can ; }
Test if the user has the required permissions to access.
@param type $user
@return boolean
Test if the user has the required permissions to access .