static public function hasPerm ($request, $permission)
    {
        $res = User_Precondition::loginRequired($request);
        if (true !== $res) {
            return $res;
        }
        if ($request->user->hasPerm($permission)) {
            return true;
        }
        throw new Pluf_Exception('you do not have permission', 4005, null, 400, 
                '', 'you do not have permission');
    }
static public function hasPerm ($request, $permission)
    {
        $res = User_Precondition::loginRequired($request);
        if (true !== $res) {
            return $res;
        }
        if ($request->user->hasPerm($permission)) {
            return true;
        }
        throw new Pluf_Exception('you do not have permission', 4005, null, 400, 
                '', 'you do not have permission');
    }
static public function hasPerm ( $ request , $ permission ) { $ res = User_Precondition :: loginRequired ( $ request ) ; if ( true !== $ res ) { return $ res ; } if ( $ request -> user -> hasPerm ( $ permission ) ) { return true ; } throw new Pluf_Exception ( 'you do not have permission' , 4005 , null , 400 , '' , 'you do not have permission' ) ; }
Check if the user has a given permission..

@param
Pluf_HTTP_Request
@param
string Permission
@return mixed
Check if the user has a given permission ..