liquid_feedback_frontend

view app/main/member/_agent_menu.lua @ 1858:3d1f0464a3ea

Handle missing ldap.member.allowed function
author bsw
date Tue Sep 20 17:35:29 2022 +0200 (20 months ago)
parents 32cc544d5a5b
children
line source
1 if app.session.real_member_id then
2 local member = Member:by_id(app.session.real_member_id)
3 ui.tag{ tag = "li", attr = { class = item_class }, content = function()
4 ui.link{
5 content = _("switch to: #{member_name}", { member_name = member.display_name }),
6 attr = { class = link_class },
7 module = "role",
8 action = "switch"
9 }
10 end }
11 end
13 local member_id = app.session.real_member_id or app.session.member_id
15 local controlled_members_count = Member:new_selector()
16 :join("agent", nil, "agent.controlled_id = member.id")
17 :add_where("agent.accepted")
18 :add_where("NOT member.locked")
19 :add_where{ "agent.controller_id = ?", member_id }
20 :exec()
22 for i, member in ipairs(controlled_members_count) do
23 if member.id ~= app.session.member_id then
24 ui.tag{ tag = "li", attr = { class = item_class }, content = function()
25 ui.link{
26 content = _("switch to: #{member_name}", { member_name = member.identification }),
27 attr = { class = link_class },
28 module = "role",
29 action = "switch",
30 id = member.id
31 }
32 end }
33 end
34 end

Impressum / About Us