liquid_feedback_frontend

diff app/main/vote/_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 ec86db506312
children 7492497005bd
line diff
     1.1 --- a/app/main/vote/_action/update.lua	Thu Feb 16 14:08:55 2012 +0100
     1.2 +++ b/app/main/vote/_action/update.lua	Thu Feb 16 15:01:49 2012 +0100
     1.3 @@ -1,5 +1,9 @@
     1.4  local issue = Issue:new_selector():add_where{ "id = ?", param.get("issue_id", atom.integer) }:for_share():single_object_mode():exec()
     1.5  
     1.6 +if not app.session.member:has_voting_right_for_unit_id(issue.area.unit_id) then
     1.7 +  error("access denied")
     1.8 +end
     1.9 +
    1.10  if issue.closed then
    1.11    slot.put_into("error", _"This issue is already closed.")
    1.12    return false

Impressum / About Us