def authorize(self): ctx = context.last(context="auth") if not ctx: raise roax.resource.Unauthorized
def authorize(self): if not context.last(self.context): raise Forbidden()
def authorize(self): ctx = context.last(context="auth") if not ctx or ctx["role"] != "god": raise roax.resource.Unauthorized
def get_context(self): """Return the context that this scheme pushes on the stack.""" return context.last(self.context)