Let a guest actually use search: declare the shipped guest grants, and draw the box for whoever can search
This commit is contained in:
@@ -74,6 +74,25 @@ class GuidesPlugin(BasePlugin):
|
||||
('guides.delete', 'Delete guides', 'guides'),
|
||||
]
|
||||
|
||||
def get_guest_grantable_permissions(self) -> List[str]:
|
||||
"""A procedure is for whoever is standing at the machine.
|
||||
|
||||
Guides are written to be followed on the floor, by people who often
|
||||
have no account and no reason to get one. The nav item and the API
|
||||
route both already reason about a signed-out reader holding this, so
|
||||
the grant was intended from the start; it qualified under the old
|
||||
.view suffix rule and is written down here now that a grant has to be
|
||||
declared.
|
||||
|
||||
What it reaches is bounded by the routes, not by this: list_guides
|
||||
returns published guides only, matching search against the PUBLISHED
|
||||
revision so draft wording cannot leak through a hit, and a guest can
|
||||
never take the author branches because a guest has no user id. Guide
|
||||
history stays with the editors. Publishing, editing and deleting are
|
||||
separate permissions and none of them is grantable.
|
||||
"""
|
||||
return ['guides.view']
|
||||
|
||||
def get_navigation_items(self) -> List[Dict]:
|
||||
# Position 8, directly under Slides (7), rather than down in the
|
||||
# Information section with the reference lists. A guide is something you
|
||||
|
||||
Reference in New Issue
Block a user