def _process_args(self): RHUserBase._process_args(self) self.identity = Identity.get_or_404(request.view_args['identity']) if self.identity.user != self.user: raise NotFound()
def _process_args(self): RHUserBase._process_args(self) self.token = OAuthToken.get(request.view_args['id']) if self.user != self.token.user: raise Forbidden( "You can only revoke tokens associated with your user")
def _process_args(self): RHUserBase._process_args(self) self.identity = Identity.get_one(request.view_args['identity']) if self.identity.user != self.user: raise NotFound()
def _checkParams(self): RHUserBase._checkParams(self) self.identity = Identity.get_one(request.view_args['identity']) if self.identity.user != self.user: raise NotFound()
def _checkProtection(self): RHUserBase._checkProtection(self) if self._doProcess and not session.user.is_admin: raise Forbidden
def _checkParams(self): RHUserBase._checkParams(self) self.token = OAuthToken.get(request.view_args['id']) if self.user != self.token.user: raise Forbidden("You can only revoke tokens associated with your user")
def _process_args(self): RHUserBase._process_args(self) self.application = OAuthApplication.get_or_404(request.view_args['id'])