Skip to content
Snippets Groups Projects

Reforma vyhodnocování práv

Closed Martin Mareš requested to merge mj/rights into master
1 unresolved thread
1 file
+ 2
4
Compare changes
  • Side-by-side
  • Inline
+ 2
4
@@ -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
)
Loading