liquid_feedback_frontend
diff model/unit.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 | 6725c13b6ce0 |
children | c587d8762e62 |
line diff
1.1 --- a/model/unit.lua Thu Feb 16 14:08:55 2012 +0100 1.2 +++ b/model/unit.lua Thu Feb 16 15:01:49 2012 +0100 1.3 @@ -10,6 +10,17 @@ 1.4 back_ref = 'unit' 1.5 } 1.6 1.7 +Unit:add_reference{ 1.8 + mode = 'mm', 1.9 + to = "Member", 1.10 + this_key = 'id', 1.11 + that_key = 'id', 1.12 + connected_by_table = 'privilege', 1.13 + connected_by_this_key = 'unit_id', 1.14 + connected_by_that_key = 'member_id', 1.15 + ref = 'members' 1.16 +} 1.17 + 1.18 function Unit:get_flattened_tree() 1.19 -- TODO implement 1.20