liquid_feedback_frontend
view app/main/oauth2/session.lua @ 1418:22cf6b9b0698
Use correct css class 2
| author | bsw | 
|---|---|
| date | Thu Aug 30 10:45:01 2018 +0200 (2018-08-30) | 
| parents | 32cc544d5a5b | 
| children | 25ea15b4bd5e | 
 line source
     1 if not request.is_post() then
     2   return execute.view { module = "index", view = "405" }
     3 end
     5 slot.set_layout(nil, "application/json")
     7 local r = json.object{
     8   member_id = json.null
     9 }
    11 if app.session.member_id then
    12   local origin = request.get_header("Origin")
    13   if origin then
    14     local system_applications = SystemApplication:by_origin(origin)
    15     if #system_applications > 0 then
    16       r.member_id = app.session.member_id
    17       r.real_member_id = app.session.real_member_id
    18       if app.session.member.role then
    19         r.member_is_role = true
    20       end
    21     else
    22       local member_application = MemberApplication:by_member_id_and_origin(app.session.member_id, origin)
    23       if member_application then
    24         r.member_id = app.session.member_id
    25         r.real_member_id = app.session.real_member_id
    26       end
    27     end
    28   end
    29 end
    31 slot.put_into("data", json.export(r))
