Skip to content
Snippets Groups Projects
Commit 1d20c08e authored by Martin Mareš's avatar Martin Mareš
Browse files

place: fixup!

parent 71d84732
No related branches found
No related tags found
No related merge requests found
......@@ -29,12 +29,10 @@ def org_place(id: int):
school = None
children = sorted(place.children, key=lambda p: locale.strxfrm(p.name))
rr = g.gatekeeper.rights_for(place)
return render_template(
'org_place.html', place=place, school=school,
rights=sorted(rr.current_rights, key=lambda r: r. name),
can_edit=rr.can_edit_place(place),
children=children
)
......@@ -79,7 +77,6 @@ def org_place_edit(id: int):
raise werkzeug.exceptions.NotFound()
rr = g.gatekeeper.rights_for(place)
if not rr.can_edit_place(place):
raise werkzeug.exceptions.Forbidden()
......@@ -356,8 +353,9 @@ def org_place_rights(id: int):
roles.sort(key=lambda r: (mo.rights.role_order_by_type[r.role], r.user.sort_key()))
rr = g.gatekeeper.rights_for(place)
rights = sorted(rr.rights, key=lambda r: r.name)
return render_template(
'org_place_rights.html', place=place, rights=rr.current_rights,
'org_place_rights.html', place=place, rights=rights,
roles=roles, roles_by_type=mo.rights.roles_by_type
)
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment