| rev | 
   line source | 
| 
bsw@1326
 | 
     1 ui.title(_"User management")
 | 
| 
bsw@1326
 | 
     2 app.html_title.title = _"User management"
 | 
| 
bsw/jbe@1309
 | 
     3 
 | 
| 
bsw/jbe@1309
 | 
     4 ui.container{ attr = { class = "mdl-grid" }, content = function()
 | 
| 
bsw/jbe@1309
 | 
     5   ui.container{ attr = { class = "mdl-cell mdl-cell--12-col" }, content = function()
 | 
| 
bsw/jbe@1309
 | 
     6 
 | 
| 
bsw/jbe@1309
 | 
     7     ui.container{ attr = { class = "mdl-card mdl-card__fullwidth mdl-shadow--2dp" }, content = function()
 | 
| 
bsw/jbe@1309
 | 
     8       ui.container{ attr = { class = "mdl-card__title mdl-card--border" }, content = function()
 | 
| 
bsw/jbe@1309
 | 
     9         ui.heading { attr = { class = "mdl-card__title-text" }, level = 2, content = function()
 | 
| 
bsw@1326
 | 
    10           ui.tag{ content = _"User management" }
 | 
| 
bsw/jbe@1309
 | 
    11         end }
 | 
| 
bsw/jbe@1309
 | 
    12       end }
 | 
| 
bsw/jbe@1309
 | 
    13 
 | 
| 
bsw/jbe@1309
 | 
    14       ui.container{ attr = { class = "mdl-card__content mdl-card--border" }, content = function()
 | 
| 
bsw/jbe@1309
 | 
    15 
 | 
| 
bsw/jbe@1309
 | 
    16         ui.container{ content = _"User accounts" }
 | 
| 
bsw/jbe@1309
 | 
    17       
 | 
| 
bsw/jbe@1309
 | 
    18         ui.tag{ tag = "ul", content = function()
 | 
| 
bsw/jbe@1309
 | 
    19 
 | 
| 
bsw/jbe@1309
 | 
    20           local count = Verification:new_selector()
 | 
| 
bsw/jbe@1309
 | 
    21             :add_where("verified_member_id ISNULL")
 | 
| 
bsw/jbe@1309
 | 
    22             :add_where("denied ISNULL")
 | 
| 
bsw/jbe@1309
 | 
    23             :count()
 | 
| 
bsw/jbe@1309
 | 
    24           ui.tag{ tag = "li", content = function()
 | 
| 
bsw/jbe@1309
 | 
    25             ui.link{ module = "registration_admin", view = "verification_requests", content = _("Open requests (#{count})", { count = count }) }
 | 
| 
bsw/jbe@1309
 | 
    26           end }
 | 
| 
bsw/jbe@1309
 | 
    27           
 | 
| 
bsw/jbe@1309
 | 
    28           ui.tag{ tag = "ul", content = function()
 | 
| 
bsw/jbe@1309
 | 
    29           
 | 
| 
bsw/jbe@1309
 | 
    30             local count = Verification:new_selector()
 | 
| 
bsw/jbe@1309
 | 
    31               :add_where("verified_member_id ISNULL")
 | 
| 
bsw/jbe@1309
 | 
    32               :add_where("denied ISNULL")
 | 
| 
bsw/jbe@1309
 | 
    33               :add_where("comment ilike '%User requested manual verification (during step 1)'")
 | 
| 
bsw/jbe@1309
 | 
    34               :count()
 | 
| 
bsw/jbe@1309
 | 
    35             ui.tag{ tag = "li", content = function()
 | 
| 
bsw/jbe@1309
 | 
    36               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
 | 
    37             end }
 | 
| 
bsw/jbe@1309
 | 
    38             
 | 
| 
bsw@1324
 | 
    39             if config.self_registration.sms_id then
 | 
| 
bsw@1324
 | 
    40               local count = Verification:new_selector()
 | 
| 
bsw@1324
 | 
    41                 :add_where("verified_member_id ISNULL")
 | 
| 
bsw@1324
 | 
    42                 :add_where("denied ISNULL")
 | 
| 
bsw@1325
 | 
    43                 :add_where("comment ilike '%User requested manual verification (during step 2)'")
 | 
| 
bsw@1325
 | 
    44                 :count()
 | 
| 
bsw@1325
 | 
    45               ui.tag{ tag = "li", content = function()
 | 
| 
bsw@1325
 | 
    46                 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
 | 
    47               end }
 | 
| 
bsw@1325
 | 
    48               
 | 
| 
bsw@1325
 | 
    49               local count = Verification:new_selector()
 | 
| 
bsw@1325
 | 
    50                 :add_where("verified_member_id ISNULL")
 | 
| 
bsw@1325
 | 
    51                 :add_where("denied ISNULL")
 | 
| 
bsw@1324
 | 
    52                 :add_where("comment ilike '% sent'")
 | 
| 
bsw@1324
 | 
    53                 :count()
 | 
| 
bsw@1324
 | 
    54               ui.tag{ tag = "li", content = function()
 | 
| 
bsw@1324
 | 
    55                 ui.link{ module = "registration_admin", view = "verification_requests", params = { mode = "pin_sent" }, content = _("PIN code not entered (yet) (#{count})", { count = count }) }
 | 
| 
bsw@1324
 | 
    56               end }
 | 
| 
bsw@1324
 | 
    57              
 | 
| 
bsw@1324
 | 
    58               local count = Verification:new_selector()
 | 
| 
bsw@1324
 | 
    59                 :add_where("verified_member_id ISNULL")
 | 
| 
bsw@1324
 | 
    60                 :add_where("denied ISNULL")
 | 
| 
bsw@1324
 | 
    61                 :add_where("comment ilike '%user entered invalid PIN three times'")
 | 
| 
bsw@1324
 | 
    62                 :count()
 | 
| 
bsw@1324
 | 
    63               ui.tag{ tag = "li", content = function()
 | 
| 
bsw@1324
 | 
    64                 ui.link{ module = "registration_admin", view = "verification_requests", params = { mode = "invalid_pin" }, content = _("Invalid PIN entered (#{count})", { count = count }) }
 | 
| 
bsw@1324
 | 
    65               end }
 | 
| 
bsw@1324
 | 
    66             end 
 | 
| 
bsw/jbe@1309
 | 
    67             
 | 
| 
bsw@1324
 | 
    68             if config.self_registration.check_for_italian_fiscal_code then
 | 
| 
bsw@1324
 | 
    69               local count = Verification:new_selector()
 | 
| 
bsw@1324
 | 
    70                 :add_where("verified_member_id ISNULL")
 | 
| 
bsw@1324
 | 
    71                 :add_where("denied ISNULL")
 | 
| 
bsw@1324
 | 
    72                 :add_where("comment similar to '%fiscal code does not match[^/]*'")
 | 
| 
bsw@1324
 | 
    73                 :count()
 | 
| 
bsw@1324
 | 
    74               ui.tag{ tag = "li", content = function()
 | 
| 
bsw@1324
 | 
    75                 ui.link{ module = "registration_admin", view = "verification_requests", params = { mode = "fiscal_code" }, content = _("Fiscal code does not match (#{count})", { count = count }) }
 | 
| 
bsw@1324
 | 
    76               end }
 | 
| 
bsw@1324
 | 
    77             end
 | 
| 
bsw@1324
 | 
    78 
 | 
| 
bsw@1490
 | 
    79             if 
 | 
| 
bsw@1490
 | 
    80               config.self_registration.check_for_italien_mobile_phone
 | 
| 
bsw@1490
 | 
    81               or config.self_registration.check_for_uk_mobile_phone
 | 
| 
bsw@1490
 | 
    82             then
 | 
| 
bsw@1490
 | 
    83               local count = Verification:new_selector()
 | 
| 
bsw@1490
 | 
    84                 :add_where("verified_member_id ISNULL")
 | 
| 
bsw@1490
 | 
    85                 :add_where("denied ISNULL")
 | 
| 
bsw@1490
 | 
    86                 :add_where("comment ilike '%mobile phone number already used before'")
 | 
| 
bsw@1490
 | 
    87                 :count()
 | 
| 
bsw@1490
 | 
    88               ui.tag{ tag = "li", content = function()
 | 
| 
bsw@1490
 | 
    89                 ui.link{ module = "registration_admin", view = "verification_requests", params = { mode = "mobile_phone" }, content = _("Phone number used before (#{count})", { count = count }) }
 | 
| 
bsw@1490
 | 
    90               end }
 | 
| 
bsw@1490
 | 
    91             end
 | 
| 
bsw@1490
 | 
    92 
 | 
| 
bsw@1490
 | 
    93             if not config.self_registration.manual_invitation then            
 | 
| 
bsw@1490
 | 
    94               local count = Verification:new_selector()
 | 
| 
bsw@1490
 | 
    95                 :add_where("verified_member_id ISNULL")
 | 
| 
bsw@1490
 | 
    96                 :add_where("denied ISNULL")
 | 
| 
bsw@1490
 | 
    97                 :add_where("comment ilike '%user with same name already exist'")
 | 
| 
bsw@1490
 | 
    98                 :count()
 | 
| 
bsw@1490
 | 
    99               ui.tag{ tag = "li", content = function()
 | 
| 
bsw@1490
 | 
   100                 ui.link{ module = "registration_admin", view = "verification_requests", params = { mode = "identification" }, content = _("Identification used before (#{count})", { count = count }) }
 | 
| 
bsw@1490
 | 
   101               end }
 | 
| 
bsw@1490
 | 
   102               
 | 
| 
bsw@1490
 | 
   103               
 | 
| 
bsw@1490
 | 
   104               local count = Verification:new_selector()
 | 
| 
bsw@1490
 | 
   105                 :add_where("verified_member_id ISNULL")
 | 
| 
bsw@1490
 | 
   106                 :add_where("denied ISNULL")
 | 
| 
bsw@1490
 | 
   107                 :add_where("comment ilike '%user with same name already exists'")
 | 
| 
bsw@1490
 | 
   108                 :count()
 | 
| 
bsw@1490
 | 
   109               ui.tag{ tag = "li", content = function()
 | 
| 
bsw@1490
 | 
   110                 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
 | 
   111               end }
 | 
| 
bsw@1490
 | 
   112             end
 | 
| 
bsw/jbe@1309
 | 
   113             
 | 
| 
bsw/jbe@1309
 | 
   114             local count = Verification:new_selector()
 | 
| 
bsw/jbe@1309
 | 
   115               :add_where("verified_member_id ISNULL")
 | 
| 
bsw/jbe@1309
 | 
   116               :add_where("denied ISNULL")
 | 
| 
bsw@1322
 | 
   117               :add_where("not comment ilike '%User requested manual verification (during step 1)'")
 | 
| 
bsw@1322
 | 
   118               :add_where("not comment ilike '%User requested manual verification (during step 2)'")
 | 
| 
bsw/jbe@1309
 | 
   119               :add_where("not comment ilike '%User requested manual verification'")
 | 
| 
bsw/jbe@1309
 | 
   120               :add_where("not comment ilike '% sent'")
 | 
| 
bsw/jbe@1309
 | 
   121               :add_where("not comment similar to '%fiscal code does not match[^/]*'")
 | 
| 
bsw/jbe@1309
 | 
   122               :add_where("not comment ilike '%mobile phone number already used before'")
 | 
| 
bsw/jbe@1309
 | 
   123               :add_where("not comment ilike '%user with same name already exist'")
 | 
| 
bsw/jbe@1309
 | 
   124               :add_where("not comment ilike '%user entered invalid PIN three times'")
 | 
| 
bsw/jbe@1309
 | 
   125               :add_where("not comment ilike '%user with same name already exists'")
 | 
| 
bsw/jbe@1309
 | 
   126               :count()
 | 
| 
bsw/jbe@1309
 | 
   127             ui.tag{ tag = "li", content = function()
 | 
| 
bsw/jbe@1309
 | 
   128               ui.link{ module = "registration_admin", view = "verification_requests", params = { mode = "other" }, content = _("other reasons (#{count})", { count = count }) }
 | 
| 
bsw/jbe@1309
 | 
   129             end }
 | 
| 
bsw/jbe@1309
 | 
   130           end }
 | 
| 
bsw/jbe@1309
 | 
   131           
 | 
| 
bsw/jbe@1309
 | 
   132           local count = Verification:new_selector()
 | 
| 
bsw/jbe@1309
 | 
   133             :join("member", nil, "member.id = verification.verified_member_id")
 | 
| 
bsw/jbe@1309
 | 
   134             :count()
 | 
| 
bsw/jbe@1309
 | 
   135           ui.tag{ tag = "li", content = function()
 | 
| 
bsw/jbe@1309
 | 
   136             ui.link{ module = "registration_admin", view = "verification_accredited", content = _("Accredited (#{count})", { count = count }) }
 | 
| 
bsw/jbe@1309
 | 
   137             ui.tag{ tag = "ul", content = function()
 | 
| 
bsw/jbe@1309
 | 
   138             
 | 
| 
bsw/jbe@1309
 | 
   139               local count = Verification:new_selector()
 | 
| 
bsw/jbe@1309
 | 
   140                 :join("member", nil, "member.id = verification.verified_member_id")
 | 
| 
bsw/jbe@1309
 | 
   141                 :add_where("member.activated ISNULL")
 | 
| 
bsw/jbe@1309
 | 
   142                 :add_where("member.deleted ISNULL")
 | 
| 
bsw/jbe@1309
 | 
   143                 :count()
 | 
| 
bsw/jbe@1309
 | 
   144               ui.tag{ tag = "li", content = function()
 | 
| 
bsw/jbe@1309
 | 
   145                 ui.link{ module = "registration_admin", view = "verification_accredited", params = { mode = "not_activated" }, content = _("Account not activated (yet) (#{count})", { count = count }) }
 | 
| 
bsw/jbe@1309
 | 
   146               end }
 | 
| 
bsw/jbe@1309
 | 
   147               
 | 
| 
bsw/jbe@1309
 | 
   148               local count = Verification:new_selector()
 | 
| 
bsw/jbe@1309
 | 
   149                 :join("member", nil, "member.id = verification.verified_member_id")
 | 
| 
bsw/jbe@1309
 | 
   150                 :add_where("member.activated NOTNULL")
 | 
| 
bsw/jbe@1309
 | 
   151                 :add_where("member.deleted ISNULL")
 | 
| 
bsw/jbe@1309
 | 
   152                 :count()
 | 
| 
bsw/jbe@1309
 | 
   153               ui.tag{ tag = "li", content = function()
 | 
| 
bsw/jbe@1309
 | 
   154                 ui.link{ module = "registration_admin", view = "verification_accredited", params = { mode = "activated" }, content = _("Activated accounts (#{count})", { count = count }) }
 | 
| 
bsw/jbe@1309
 | 
   155               end }
 | 
| 
bsw/jbe@1309
 | 
   156               
 | 
| 
bsw/jbe@1309
 | 
   157               local count = Verification:new_selector()
 | 
| 
bsw/jbe@1309
 | 
   158                 :join("member", nil, "member.id = verification.verified_member_id")
 | 
| 
bsw/jbe@1309
 | 
   159                 :add_where("member.deleted NOTNULL")
 | 
| 
bsw/jbe@1309
 | 
   160                 :count()
 | 
| 
bsw/jbe@1309
 | 
   161               ui.tag{ tag = "li", content = function()
 | 
| 
bsw/jbe@1309
 | 
   162                 ui.link{ module = "registration_admin", view = "verification_cancelled", content = _("Cancelled accounts (#{count})", { count = count }) }
 | 
| 
bsw/jbe@1309
 | 
   163               end }
 | 
| 
bsw/jbe@1309
 | 
   164             end }
 | 
| 
bsw/jbe@1309
 | 
   165           end }
 | 
| 
bsw/jbe@1309
 | 
   166           
 | 
| 
bsw/jbe@1309
 | 
   167           local count = Verification:new_selector()
 | 
| 
bsw/jbe@1309
 | 
   168             :add_where("denied NOTNULL")
 | 
| 
bsw/jbe@1309
 | 
   169             :count()
 | 
| 
bsw/jbe@1309
 | 
   170           ui.tag{ tag = "li", content = function()
 | 
| 
bsw/jbe@1309
 | 
   171             ui.link{ module = "registration_admin", view = "verification_rejected", content = _("Rejected requests (#{count})", { count = count }) }
 | 
| 
bsw/jbe@1309
 | 
   172           end }
 | 
| 
bsw/jbe@1309
 | 
   173           
 | 
| 
bsw/jbe@1309
 | 
   174         end }
 | 
| 
bsw/jbe@1309
 | 
   175 
 | 
| 
bsw@1490
 | 
   176         if config.role_accounts then
 | 
| 
bsw@1490
 | 
   177 
 | 
| 
bsw@1490
 | 
   178           ui.container{ content = _"Role accounts" }
 | 
| 
bsw@1490
 | 
   179         
 | 
| 
bsw@1490
 | 
   180           ui.tag{ tag = "ul", content = function()
 | 
| 
bsw/jbe@1309
 | 
   181 
 | 
| 
bsw@1490
 | 
   182             local count = RoleVerification:new_selector()
 | 
| 
bsw@1490
 | 
   183               :add_where("verified ISNULL")
 | 
| 
bsw@1490
 | 
   184               :add_where("denied ISNULL")
 | 
| 
bsw@1490
 | 
   185               :count()
 | 
| 
bsw@1490
 | 
   186             ui.tag{ tag = "li", content = function()
 | 
| 
bsw@1490
 | 
   187               ui.link{ module = "registration_admin", view = "role_verification_requests", content = _("Open requests (#{count})", { count = count }) }
 | 
| 
bsw@1490
 | 
   188             end }
 | 
| 
bsw@1490
 | 
   189             
 | 
| 
bsw@1490
 | 
   190             local count = RoleVerification:new_selector()
 | 
| 
bsw@1490
 | 
   191               :add_where("verified NOTNULL")
 | 
| 
bsw@1490
 | 
   192               :add_where("denied ISNULL")
 | 
| 
bsw@1490
 | 
   193               :join("member", nil, "member.id = role_verification.verified_member_id")
 | 
| 
bsw@1490
 | 
   194               :add_where("member.deleted ISNULL")
 | 
| 
bsw@1490
 | 
   195               :count()
 | 
| 
bsw@1490
 | 
   196             ui.tag{ tag = "li", content = function()
 | 
| 
bsw@1490
 | 
   197               ui.link{ module = "registration_admin", view = "role_verification_accredited", content = _("Accredited (#{count})", { count = count }) }
 | 
| 
bsw@1490
 | 
   198             end }
 | 
| 
bsw@1490
 | 
   199             
 | 
| 
bsw@1490
 | 
   200             local count = RoleVerification:new_selector()
 | 
| 
bsw@1490
 | 
   201               :add_where("verified NOTNULL")
 | 
| 
bsw@1490
 | 
   202               :add_where("denied ISNULL")
 | 
| 
bsw@1490
 | 
   203               :join("member", nil, "member.id = role_verification.verified_member_id")
 | 
| 
bsw@1490
 | 
   204               :add_where("member.deleted NOTNULL")
 | 
| 
bsw@1490
 | 
   205               :count()
 | 
| 
bsw@1490
 | 
   206             ui.tag{ tag = "li", content = function()
 | 
| 
bsw@1490
 | 
   207               ui.link{ module = "registration_admin", view = "role_verification_cancelled", content = _("Cancelled (#{count})", { count = count }) }
 | 
| 
bsw@1490
 | 
   208             end }
 | 
| 
bsw@1490
 | 
   209             
 | 
| 
bsw@1490
 | 
   210             local count = RoleVerification:new_selector()
 | 
| 
bsw@1490
 | 
   211               :add_where("verified ISNULL")
 | 
| 
bsw@1490
 | 
   212               :add_where("denied NOTNULL")
 | 
| 
bsw@1490
 | 
   213               :count()
 | 
| 
bsw@1490
 | 
   214             ui.tag{ tag = "li", content = function()
 | 
| 
bsw@1490
 | 
   215               ui.link{ module = "registration_admin", view = "role_verification_rejected", content = _("Rejected (#{count})", { count = count }) }
 | 
| 
bsw@1490
 | 
   216             end }
 | 
| 
bsw@1490
 | 
   217             
 | 
| 
bsw/jbe@1309
 | 
   218           end }
 | 
| 
bsw@1490
 | 
   219         end          
 | 
| 
bsw/jbe@1309
 | 
   220 
 | 
| 
bsw/jbe@1309
 | 
   221       end }
 | 
| 
bsw/jbe@1309
 | 
   222     end }
 | 
| 
bsw/jbe@1309
 | 
   223 
 | 
| 
bsw/jbe@1309
 | 
   224 
 | 
| 
bsw/jbe@1309
 | 
   225 
 | 
| 
bsw/jbe@1309
 | 
   226   end }
 | 
| 
bsw/jbe@1309
 | 
   227 end }
 | 
| 
bsw/jbe@1309
 | 
   228 
 |