This commit is contained in:
Daniel Dayley 2024-11-07 10:50:34 -07:00
parent 1ae3b084f4
commit 3a8c504a50
Signed by: Cronocide
GPG Key ID: 1CADA052F64664EC

View File

@ -55,10 +55,12 @@ async def serve_file(request: Request, file_path: str) :
shouldremove = True
if 'groups' in service.attrs.keys() :
allowed_groups = service['groups'].split(',')
if list(set(current_groups) & set(allowed_groups)) == [] :
shouldremove = True
else :
shouldremove = False
else :
allowed_groups = ["Admins"]
if not list(set(current_groups) & set(allowed_groups)) :
shouldremove = True
else :
shouldremove = False
if shouldremove :
service.decompose()
for category in soup.select('li.category:not(:has(ul li))') :