liquid_feedback_frontend
changeset 1516:9d99a4f262a2
Fixed privilege check for support via API
author | bsw |
---|---|
date | Thu Aug 20 14:03:09 2020 +0200 (2020-08-20) |
parents | 6077545667ec |
children | 4f182720a2ec |
files | env/util/add_support.lua |
line diff
1.1 --- a/env/util/add_support.lua Thu Aug 20 14:01:38 2020 +0200 1.2 +++ b/env/util/add_support.lua Thu Aug 20 14:03:09 2020 +0200 1.3 @@ -5,7 +5,9 @@ 1.4 -- TODO important m1 selectors returning result _SET_! 1.5 local issue = initiative:get_reference_selector("issue"):for_share():single_object_mode():exec() 1.6 1.7 - if not app.session.member:has_voting_right_for_unit_id(issue.area.unit_id) then 1.8 + local member = app.access_token.member or app.session.member 1.9 + 1.10 + if not member:has_voting_right_for_unit_id(issue.area.unit_id) then 1.11 slot.put_into("error", _"No voting rights.") 1.12 return false 1.13 end