liquid_feedback_frontend

changeset 296:d39fa6c0ff0b

Check voting right of delegation trustee
author bsw
date Sat Feb 25 22:20:38 2012 +0100 (2012-02-25)
parents fac04b72bc9a
children c4dd225578d4
files app/main/delegation/_action/update.lua
line diff
     1.1 --- a/app/main/delegation/_action/update.lua	Sat Feb 25 21:19:12 2012 +0100
     1.2 +++ b/app/main/delegation/_action/update.lua	Sat Feb 25 22:20:38 2012 +0100
     1.3 @@ -33,6 +33,8 @@
     1.4    end
     1.5  
     1.6  else
     1.7 +  
     1.8 +  local trustee = Member:by_id(trustee_id)
     1.9  
    1.10    local check_unit_id
    1.11    if unit_id then
    1.12 @@ -45,6 +47,11 @@
    1.13      local area = Area:by_id(issue.area_id)
    1.14      check_unit_id = area.unit_id
    1.15    end
    1.16 +  
    1.17 +  if not trustee:has_voting_right_for_unit_id(check_unit_id) then
    1.18 +    slot.put_into("error", _"Trustee has no voting right in this unit")
    1.19 +    return false
    1.20 +  end
    1.21  
    1.22    if not app.session.member:has_voting_right_for_unit_id(check_unit_id) then
    1.23      error("access denied")

Impressum / About Us