Add SSO diagnostics

This commit is contained in:
Sam 2014-08-23 10:34:48 +10:00
parent f493eb5d12
commit e0a74e336a
4 changed files with 45 additions and 0 deletions

View File

@ -362,6 +362,35 @@
</div>
</section>
{{#if single_sign_on_record}}
<section class='details'>
<h1>{{i18n admin.user.sso.title}}</h1>
{{#with single_sign_on_record}}
<div class='display-row'>
<div class='field'>{{i18n admin.user.sso.external_id}}</div>
<div class='value'>{{external_id}}</div>
</div>
<div class='display-row'>
<div class='field'>{{i18n admin.user.sso.external_username}}</div>
<div class='value'>{{external_username}}</div>
</div>
<div class='display-row'>
<div class='field'>{{i18n admin.user.sso.external_name}}</div>
<div class='value'>{{external_name}}</div>
</div>
<div class='display-row'>
<div class='field'>{{i18n admin.user.sso.external_email}}</div>
<div class='value'>{{external_email}}</div>
</div>
<div class='display-row'>
<div class='field'>{{i18n admin.user.sso.external_avatar_url}}</div>
<div class='value'>{{external_avatar_url}}</div>
</div>
{{/with}}
</section>
{{/if}}
<section>
<hr/>
<button {{bind-attr class=":btn :btn-danger :pull-right deleteForbidden:hidden"}} {{action destroy target="content"}} {{bind-attr disabled="deleteForbidden"}}>

View File

@ -26,6 +26,8 @@ class AdminUserSerializer < BasicUserSerializer
:blocked,
:time_read
has_one :single_sign_on_record, serializer: SingleSignOnRecordSerializer, embed: :objects
[:days_visited,:posts_read_count,:topics_entered].each do |sym|
attributes sym
define_method sym do

View File

@ -0,0 +1,7 @@
class SingleSignOnRecordSerializer < ApplicationSerializer
attributes :user_id, :external_id,
:last_payload, :created_at,
:updated_at, :external_username,
:external_email, :external_name,
:external_avatar_url
end

View File

@ -1944,6 +1944,13 @@ en:
qualifies: "Qualifies for trust level 3."
will_be_promoted: "Will be promoted within 24 hours."
does_not_qualify: "Doesn't qualify for trust level 3."
sso:
title: "Single Sign On"
external_id: "External ID"
external_username: "Username"
external_name: "Name"
external_email: "Email"
external_avatar_url: "Avatar URL"
site_content:
none: "Choose a type of content to begin editing."