Typos
This commit is contained in:
parent
b994993daf
commit
8cd51313ac
@ -48,7 +48,7 @@ async def serve_file(request: Request, file_path: str) :
|
|||||||
raw_markup = html = open(os.path.join(base_path, index_file))
|
raw_markup = html = open(os.path.join(base_path, index_file))
|
||||||
soup = BeautifulSoup(raw_markup, 'html.parser')
|
soup = BeautifulSoup(raw_markup, 'html.parser')
|
||||||
for service in soup.find_all("li", class_='service') :
|
for service in soup.find_all("li", class_='service') :
|
||||||
shouldremove = false
|
shouldremove = False
|
||||||
if 'users' in service.attrs.keys() :
|
if 'users' in service.attrs.keys() :
|
||||||
allowed_users = service['users'].split(',')
|
allowed_users = service['users'].split(',')
|
||||||
if allowed_users != ["Any"] and user_header not in allowed_users :
|
if allowed_users != ["Any"] and user_header not in allowed_users :
|
||||||
@ -56,9 +56,9 @@ async def serve_file(request: Request, file_path: str) :
|
|||||||
if 'groups' in service.attrs.keys() :
|
if 'groups' in service.attrs.keys() :
|
||||||
allowed_groups = service['groups'].split(',')
|
allowed_groups = service['groups'].split(',')
|
||||||
if list(set(current_groups) & set(allowed_groups)) == [] :
|
if list(set(current_groups) & set(allowed_groups)) == [] :
|
||||||
shouldremove = true
|
shouldremove = True
|
||||||
else :
|
else :
|
||||||
shouldremove = false
|
shouldremove = False
|
||||||
if shouldremove :
|
if shouldremove :
|
||||||
service.decompose()
|
service.decompose()
|
||||||
for category in soup.select('li.category:not(:has(ul li))') :
|
for category in soup.select('li.category:not(:has(ul li))') :
|
||||||
|
Loading…
Reference in New Issue
Block a user