class NotSecretController(object): @expose() def _lookup(self, someID, *remainder): if someID == 'notfound': return None return SubController(someID), remainder unlocked = unlocked(SubController('unlocked'))
class SecretController(SecureController): @expose() def index(self): return 'Index' @expose() @unlocked def allowed(self): return 'Allowed!' authorized = unlocked(AuthorizedSubController())