def get(environ, start_response): """ Get the representation of a recipe, based on the requested serialization. Will usually show the list of bags and filters that make up the recipe. """ recipe = _determine_recipe(environ) recipe.policy.allows(environ['tiddlyweb.usersign'], 'read') return send_entity(environ, start_response, recipe)
def get(environ, start_response): """ Get a representation in some serialization of a bag (the bag itself not the tiddlers within). """ bag_name = web.get_route_value(environ, 'bag_name') bag_name = web.handle_extension(environ, bag_name) bag = _get_bag(environ, bag_name) bag.policy.allows(environ['tiddlyweb.usersign'], 'manage') return send_entity(environ, start_response, bag)
def get(environ, start_response): """ Get a representation in some serialization of a bag (the bag itself not the tiddlers within). """ bag_name = _determine_bag_name(environ) bag_name = web.handle_extension(environ, bag_name) bag = _get_bag(environ, bag_name) bag.policy.allows(environ["tiddlyweb.usersign"], "manage") return send_entity(environ, start_response, bag)
def get(environ, start_response): """ Handle ``GET`` on a single recipe URI. Get a representation in some serialization determined by :py:mod:`tiddlyweb.web.negotiate` of a :py:class:`recipe <tiddlyweb.model.recipe.Recipe>` (just the recipe itself, not the tiddlers it can produce). """ recipe = _determine_recipe(environ) recipe.policy.allows(environ['tiddlyweb.usersign'], 'read') return send_entity(environ, start_response, recipe)
def get(environ, start_response): """ Handle ``GET`` on a single bag URI. Get a representation in some serialization determined by :py:mod:`tiddlyweb.web.negotiate` of a :py:class:`bag <tiddlyweb.model.bag.Bag>` (the bag itself, not the tiddlers within). """ bag_name = web.get_route_value(environ, 'bag_name') bag_name = web.handle_extension(environ, bag_name) bag = _get_bag(environ, bag_name) bag.policy.allows(environ['tiddlyweb.usersign'], 'manage') return send_entity(environ, start_response, bag)