Skip to content
Snippets Groups Projects

Fix event detail view permissions

Merged Tom Teichler requested to merge fix-permissions into master
2 files
+ 6
2
Compare changes
  • Side-by-side
  • Inline
Files
2
import rules
import rules;
from aleksis.core.util.predicates import (
has_any_object,
@@ -65,6 +65,10 @@ view_event_predicate = (
)
rules.add_perm("paweljong.view_event_rule", view_event_predicate)
# Event organiser view
view_event_detail_predicate = (has_person & is_organiser)
rules.add_perm("paweljong.view_event_detail_rule", view_event_detail_predicate)
# Delete event
delete_event_predicate = has_person & (
has_global_perm("paweljong.delete_event") | has_object_perm("paweljong.delete_event")
Loading