# HG changeset patch # User bsw # Date 1612650620 -3600 # Node ID 72442abafb3ca9949e91e0c463b0b67ad210a07e # Parent a17ad625ffbcf37641b6359b5e4b38d40f622370 Allow delegations when initiative right is given diff -r a17ad625ffbc -r 72442abafb3c app/main/delegation/_action/update.lua --- a/app/main/delegation/_action/update.lua Sat Feb 06 22:44:34 2021 +0100 +++ b/app/main/delegation/_action/update.lua Sat Feb 06 23:30:20 2021 +0100 @@ -56,12 +56,18 @@ check_unit_id = area.unit_id end - if trustee and not trustee:has_voting_right_for_unit_id(check_unit_id) then + if trustee and not ( + trustee:has_voting_right_for_unit_id(check_unit_id) + or trustee:has_initiative_right_for_unit_id(check_unit_id) + ) then slot.put_into("error", _"Trustee has no voting right in this unit") return false end - if not app.session.member:has_voting_right_for_unit_id(check_unit_id) then + if not ( + app.session.member:has_voting_right_for_unit_id(check_unit_id) + or app.session.member:has_initiative_right_for_unit_id(check_unit_id) + ) then return execute.view { module = "index", view = "403" } end