public static function permission ($request = null, $match = null)
    {
        
        // Check user
        if (!$request->user || $request->user->isAnonymous()) {
            return false;
        }
        
        // Get permission
        $per = new User_Role();
        $sql = new Pluf_SQL('code_name=%s',
            array(
                $match['metricName']
            ));
        $items = $per->getList(
            array(
                'filter' => $sql->gen()
            ));
        if ($items->count() == 0) {
            return false;
        }
        
        // Check permission
        return $request->user->hasPerm($items[0].'');
    }
public static function permission ($request = null, $match = null)
    {
        
        // Check user
        if (!$request->user || $request->user->isAnonymous()) {
            return false;
        }
        
        // Get permission
        $per = new User_Role();
        $sql = new Pluf_SQL('code_name=%s',
            array(
                $match['metricName']
            ));
        $items = $per->getList(
            array(
                'filter' => $sql->gen()
            ));
        if ($items->count() == 0) {
            return false;
        }
        
        // Check permission
        return $request->user->hasPerm($items[0].'');
    }
public static function permission ( $ request = null , $ match = null ) { // Check user if ( ! $ request -> user || $ request -> user -> isAnonymous ( ) ) { return false ; } // Get permission $ per = new User_Role ( ) ; $ sql = new Pluf_SQL ( 'code_name=%s' , array ( $ match [ 'metricName' ] ) ) ; $ items = $ per -> getList ( array ( 'filter' => $ sql -> gen ( ) ) ) ; if ( $ items -> count ( ) == 0 ) { return false ; } // Check permission return $ request -> user -> hasPerm ( $ items [ 0 ] . '' ) ; }
Retruns permision status

@param Pluf_HTTP_Request $request
@param array $match
Retruns permision status