Fix app_map

This commit is contained in:
Josué Tille 2020-04-03 21:27:44 +02:00
parent dc38d57baa
commit 7afe07018e
No known key found for this signature in database
GPG key ID: 716A6C99B04194EF

View file

@ -219,7 +219,7 @@ def app_map(app=None, raw=False, user=None, permission=None):
if user not in main_perm["corresponding_users"]:
continue
this_app_perms = {p: i for p, i in permissions.items() if p.startswith(app_id + ".") and i["url"]}
this_app_perms = {p: i for p, i in permissions.items() if p.startswith(app_id + ".") and (i["url"] or i['additional_urls'] != [None])}
for perm_name, perm_info in this_app_perms.items():
# If we're building the map for a specific user, check the user
# actually is allowed for this specific perm