$def with (path, error) $var title: Permission Denied

$_("Permission denied.")

$error

$if not ctx.user: $if path == "/books/add":

Only logged users are allowed to add records on Open Library. Please log in to add a book.

$elif path.startswith("/books/") or path.startswith("/works/") or path.startswith("/authors/"):

Only logged users are allowed to modify records on Open Library. Please log in to edit this page.

$else:

$:_('You may log in if you have the required permissions.', "/account/login?" + urlencode(dict(redirect=path)))