bsw@1326: ui.title(_"User management") bsw@1326: app.html_title.title = _"User management" bsw/jbe@1309: bsw/jbe@1309: ui.container{ attr = { class = "mdl-grid" }, content = function() bsw/jbe@1309: ui.container{ attr = { class = "mdl-cell mdl-cell--12-col" }, content = function() bsw/jbe@1309: bsw/jbe@1309: ui.container{ attr = { class = "mdl-card mdl-card__fullwidth mdl-shadow--2dp" }, content = function() bsw/jbe@1309: ui.container{ attr = { class = "mdl-card__title mdl-card--border" }, content = function() bsw/jbe@1309: ui.heading { attr = { class = "mdl-card__title-text" }, level = 2, content = function() bsw@1326: ui.tag{ content = _"User management" } bsw/jbe@1309: end } bsw/jbe@1309: end } bsw/jbe@1309: bsw/jbe@1309: ui.container{ attr = { class = "mdl-card__content mdl-card--border" }, content = function() bsw/jbe@1309: bsw/jbe@1309: ui.container{ content = _"User accounts" } bsw/jbe@1309: bsw/jbe@1309: ui.tag{ tag = "ul", content = function() bsw/jbe@1309: bsw/jbe@1309: local count = Verification:new_selector() bsw/jbe@1309: :add_where("verified_member_id ISNULL") bsw/jbe@1309: :add_where("denied ISNULL") bsw/jbe@1309: :count() bsw/jbe@1309: ui.tag{ tag = "li", content = function() bsw/jbe@1309: ui.link{ module = "registration_admin", view = "verification_requests", content = _("Open requests (#{count})", { count = count }) } bsw/jbe@1309: end } bsw/jbe@1309: bsw/jbe@1309: ui.tag{ tag = "ul", content = function() bsw/jbe@1309: bsw/jbe@1309: local count = Verification:new_selector() bsw/jbe@1309: :add_where("verified_member_id ISNULL") bsw/jbe@1309: :add_where("denied ISNULL") bsw/jbe@1309: :add_where("comment ilike '%User requested manual verification (during step 1)'") bsw/jbe@1309: :count() bsw/jbe@1309: ui.tag{ tag = "li", content = function() bsw/jbe@1309: ui.link{ module = "registration_admin", view = "verification_requests", params = { mode = "manual_requested", step = 1 }, content = _("Manual verification requested during step 1 (#{count})", { count = count }) } bsw/jbe@1309: end } bsw/jbe@1309: bsw@1324: if config.self_registration.sms_id then bsw@1324: local count = Verification:new_selector() bsw@1324: :add_where("verified_member_id ISNULL") bsw@1324: :add_where("denied ISNULL") bsw@1325: :add_where("comment ilike '%User requested manual verification (during step 2)'") bsw@1325: :count() bsw@1325: ui.tag{ tag = "li", content = function() bsw@1325: ui.link{ module = "registration_admin", view = "verification_requests", params = { mode = "manual_requested", step = 2 }, content = _("Manual verification requested during step 2 (#{count})", { count = count }) } bsw@1325: end } bsw@1325: bsw@1325: local count = Verification:new_selector() bsw@1325: :add_where("verified_member_id ISNULL") bsw@1325: :add_where("denied ISNULL") bsw@1324: :add_where("comment ilike '% sent'") bsw@1324: :count() bsw@1324: ui.tag{ tag = "li", content = function() bsw@1324: ui.link{ module = "registration_admin", view = "verification_requests", params = { mode = "pin_sent" }, content = _("PIN code not entered (yet) (#{count})", { count = count }) } bsw@1324: end } bsw@1324: bsw@1324: local count = Verification:new_selector() bsw@1324: :add_where("verified_member_id ISNULL") bsw@1324: :add_where("denied ISNULL") bsw@1324: :add_where("comment ilike '%user entered invalid PIN three times'") bsw@1324: :count() bsw@1324: ui.tag{ tag = "li", content = function() bsw@1324: ui.link{ module = "registration_admin", view = "verification_requests", params = { mode = "invalid_pin" }, content = _("Invalid PIN entered (#{count})", { count = count }) } bsw@1324: end } bsw@1324: end bsw/jbe@1309: bsw@1324: if config.self_registration.check_for_italian_fiscal_code then bsw@1324: local count = Verification:new_selector() bsw@1324: :add_where("verified_member_id ISNULL") bsw@1324: :add_where("denied ISNULL") bsw@1324: :add_where("comment similar to '%fiscal code does not match[^/]*'") bsw@1324: :count() bsw@1324: ui.tag{ tag = "li", content = function() bsw@1324: ui.link{ module = "registration_admin", view = "verification_requests", params = { mode = "fiscal_code" }, content = _("Fiscal code does not match (#{count})", { count = count }) } bsw@1324: end } bsw@1324: end bsw@1324: bsw@1490: if bsw@1490: config.self_registration.check_for_italien_mobile_phone bsw@1490: or config.self_registration.check_for_uk_mobile_phone bsw@1490: then bsw@1490: local count = Verification:new_selector() bsw@1490: :add_where("verified_member_id ISNULL") bsw@1490: :add_where("denied ISNULL") bsw@1490: :add_where("comment ilike '%mobile phone number already used before'") bsw@1490: :count() bsw@1490: ui.tag{ tag = "li", content = function() bsw@1490: ui.link{ module = "registration_admin", view = "verification_requests", params = { mode = "mobile_phone" }, content = _("Phone number used before (#{count})", { count = count }) } bsw@1490: end } bsw@1490: end bsw@1490: bsw@1490: if not config.self_registration.manual_invitation then bsw@1490: local count = Verification:new_selector() bsw@1490: :add_where("verified_member_id ISNULL") bsw@1490: :add_where("denied ISNULL") bsw@1490: :add_where("comment ilike '%user with same name already exist'") bsw@1490: :count() bsw@1490: ui.tag{ tag = "li", content = function() bsw@1490: ui.link{ module = "registration_admin", view = "verification_requests", params = { mode = "identification" }, content = _("Identification used before (#{count})", { count = count }) } bsw@1490: end } bsw@1490: bsw@1490: bsw@1490: local count = Verification:new_selector() bsw@1490: :add_where("verified_member_id ISNULL") bsw@1490: :add_where("denied ISNULL") bsw@1490: :add_where("comment ilike '%user with same name already exists'") bsw@1490: :count() bsw@1490: ui.tag{ tag = "li", content = function() bsw@1490: ui.link{ module = "registration_admin", view = "verification_requests", params = { mode = "same_name_already_exists" }, content = _("User with same name already exists (#{count})", { count = count }) } bsw@1490: end } bsw@1490: end bsw/jbe@1309: bsw/jbe@1309: local count = Verification:new_selector() bsw/jbe@1309: :add_where("verified_member_id ISNULL") bsw/jbe@1309: :add_where("denied ISNULL") bsw@1322: :add_where("not comment ilike '%User requested manual verification (during step 1)'") bsw@1322: :add_where("not comment ilike '%User requested manual verification (during step 2)'") bsw/jbe@1309: :add_where("not comment ilike '%User requested manual verification'") bsw/jbe@1309: :add_where("not comment ilike '% sent'") bsw/jbe@1309: :add_where("not comment similar to '%fiscal code does not match[^/]*'") bsw/jbe@1309: :add_where("not comment ilike '%mobile phone number already used before'") bsw/jbe@1309: :add_where("not comment ilike '%user with same name already exist'") bsw/jbe@1309: :add_where("not comment ilike '%user entered invalid PIN three times'") bsw/jbe@1309: :add_where("not comment ilike '%user with same name already exists'") bsw/jbe@1309: :count() bsw/jbe@1309: ui.tag{ tag = "li", content = function() bsw/jbe@1309: ui.link{ module = "registration_admin", view = "verification_requests", params = { mode = "other" }, content = _("other reasons (#{count})", { count = count }) } bsw/jbe@1309: end } bsw/jbe@1309: end } bsw/jbe@1309: bsw/jbe@1309: local count = Verification:new_selector() bsw/jbe@1309: :join("member", nil, "member.id = verification.verified_member_id") bsw/jbe@1309: :count() bsw/jbe@1309: ui.tag{ tag = "li", content = function() bsw/jbe@1309: ui.link{ module = "registration_admin", view = "verification_accredited", content = _("Accredited (#{count})", { count = count }) } bsw/jbe@1309: ui.tag{ tag = "ul", content = function() bsw/jbe@1309: bsw/jbe@1309: local count = Verification:new_selector() bsw/jbe@1309: :join("member", nil, "member.id = verification.verified_member_id") bsw/jbe@1309: :add_where("member.activated ISNULL") bsw/jbe@1309: :add_where("member.deleted ISNULL") bsw/jbe@1309: :count() bsw/jbe@1309: ui.tag{ tag = "li", content = function() bsw/jbe@1309: ui.link{ module = "registration_admin", view = "verification_accredited", params = { mode = "not_activated" }, content = _("Account not activated (yet) (#{count})", { count = count }) } bsw/jbe@1309: end } bsw/jbe@1309: bsw/jbe@1309: local count = Verification:new_selector() bsw/jbe@1309: :join("member", nil, "member.id = verification.verified_member_id") bsw/jbe@1309: :add_where("member.activated NOTNULL") bsw/jbe@1309: :add_where("member.deleted ISNULL") bsw/jbe@1309: :count() bsw/jbe@1309: ui.tag{ tag = "li", content = function() bsw/jbe@1309: ui.link{ module = "registration_admin", view = "verification_accredited", params = { mode = "activated" }, content = _("Activated accounts (#{count})", { count = count }) } bsw/jbe@1309: end } bsw/jbe@1309: bsw/jbe@1309: local count = Verification:new_selector() bsw/jbe@1309: :join("member", nil, "member.id = verification.verified_member_id") bsw/jbe@1309: :add_where("member.deleted NOTNULL") bsw/jbe@1309: :count() bsw/jbe@1309: ui.tag{ tag = "li", content = function() bsw/jbe@1309: ui.link{ module = "registration_admin", view = "verification_cancelled", content = _("Cancelled accounts (#{count})", { count = count }) } bsw/jbe@1309: end } bsw/jbe@1309: end } bsw/jbe@1309: end } bsw/jbe@1309: bsw/jbe@1309: local count = Verification:new_selector() bsw/jbe@1309: :add_where("denied NOTNULL") bsw/jbe@1309: :count() bsw/jbe@1309: ui.tag{ tag = "li", content = function() bsw/jbe@1309: ui.link{ module = "registration_admin", view = "verification_rejected", content = _("Rejected requests (#{count})", { count = count }) } bsw/jbe@1309: end } bsw/jbe@1309: bsw/jbe@1309: end } bsw/jbe@1309: bsw@1490: if config.role_accounts then bsw@1490: bsw@1490: ui.container{ content = _"Role accounts" } bsw@1490: bsw@1490: ui.tag{ tag = "ul", content = function() bsw/jbe@1309: bsw@1490: local count = RoleVerification:new_selector() bsw@1490: :add_where("verified ISNULL") bsw@1490: :add_where("denied ISNULL") bsw@1490: :count() bsw@1490: ui.tag{ tag = "li", content = function() bsw@1490: ui.link{ module = "registration_admin", view = "role_verification_requests", content = _("Open requests (#{count})", { count = count }) } bsw@1490: end } bsw@1490: bsw@1490: local count = RoleVerification:new_selector() bsw@1490: :add_where("verified NOTNULL") bsw@1490: :add_where("denied ISNULL") bsw@1490: :join("member", nil, "member.id = role_verification.verified_member_id") bsw@1490: :add_where("member.deleted ISNULL") bsw@1490: :count() bsw@1490: ui.tag{ tag = "li", content = function() bsw@1490: ui.link{ module = "registration_admin", view = "role_verification_accredited", content = _("Accredited (#{count})", { count = count }) } bsw@1490: end } bsw@1490: bsw@1490: local count = RoleVerification:new_selector() bsw@1490: :add_where("verified NOTNULL") bsw@1490: :add_where("denied ISNULL") bsw@1490: :join("member", nil, "member.id = role_verification.verified_member_id") bsw@1490: :add_where("member.deleted NOTNULL") bsw@1490: :count() bsw@1490: ui.tag{ tag = "li", content = function() bsw@1490: ui.link{ module = "registration_admin", view = "role_verification_cancelled", content = _("Cancelled (#{count})", { count = count }) } bsw@1490: end } bsw@1490: bsw@1490: local count = RoleVerification:new_selector() bsw@1490: :add_where("verified ISNULL") bsw@1490: :add_where("denied NOTNULL") bsw@1490: :count() bsw@1490: ui.tag{ tag = "li", content = function() bsw@1490: ui.link{ module = "registration_admin", view = "role_verification_rejected", content = _("Rejected (#{count})", { count = count }) } bsw@1490: end } bsw@1490: bsw/jbe@1309: end } bsw@1490: end bsw/jbe@1309: bsw/jbe@1309: end } bsw/jbe@1309: end } bsw/jbe@1309: bsw/jbe@1309: bsw/jbe@1309: bsw/jbe@1309: end } bsw/jbe@1309: end } bsw/jbe@1309: