slides: grantable slides.manage permission for non-admin curators

This commit is contained in:
2026-07-29 08:41:53 -04:00
parent 02147827f0
commit eeae042aa8
8 changed files with 106 additions and 10 deletions

View File

@@ -58,14 +58,25 @@ class SlidesPlugin(BasePlugin):
"""Slide playlist metadata (image files live on disk)."""
return [TvSlide]
def get_permissions(self) -> List:
"""RBAC permission for curating slides (both surfaces). Grantable to a
non-admin role so a curator can manage the lobby TV + screensaver
without full admin. Admins hold it by default."""
return [
('slides.manage',
'Manage lobby display and screensaver slides', 'slides'),
]
def get_navigation_items(self) -> List[Dict]:
"""Sidebar entry for the slide manager (admin)."""
"""Sidebar entry for the slide manager. Gated on slides.manage so only a
curator (or admin, who holds it by default) sees the link."""
return [
{
'name': 'Slides',
'icon': 'image',
'route': '/settings/slides',
'position': 7,
'permission': 'slides.manage',
},
]