liquid_feedback_frontend

diff app/main/membership/_action/update.lua @ 281:b77e6a17ca77

Check unit voting right where neccessary, hide action buttons for units without voting right
author bsw
date Thu Feb 16 15:01:49 2012 +0100 (2012-02-16)
parents bde068b37608
children 701a5cf6b067
line diff
     1.1 --- a/app/main/membership/_action/update.lua	Thu Feb 16 14:08:55 2012 +0100
     1.2 +++ b/app/main/membership/_action/update.lua	Thu Feb 16 15:01:49 2012 +0100
     1.3 @@ -12,6 +12,10 @@
     1.4  end
     1.5  
     1.6  if not membership then
     1.7 +  local area = Area:by_id(area_id)
     1.8 +  if not app.session.member:has_voting_right_for_unit_id(area.unit_id) then
     1.9 +    error("access denied")
    1.10 +  end
    1.11    membership = Membership:new()
    1.12    membership.area_id    = area_id
    1.13    membership.member_id  = app.session.member_id

Impressum / About Us