diff --git a/app/assets/javascripts/admin/templates/user_index.js.handlebars b/app/assets/javascripts/admin/templates/user_index.js.handlebars index 74e4ba26464..513abfabe60 100644 --- a/app/assets/javascripts/admin/templates/user_index.js.handlebars +++ b/app/assets/javascripts/admin/templates/user_index.js.handlebars @@ -362,6 +362,35 @@ +{{#if single_sign_on_record}} + + {{i18n admin.user.sso.title}} + + {{#with single_sign_on_record}} + + {{i18n admin.user.sso.external_id}} + {{external_id}} + + + {{i18n admin.user.sso.external_username}} + {{external_username}} + + + {{i18n admin.user.sso.external_name}} + {{external_name}} + + + {{i18n admin.user.sso.external_email}} + {{external_email}} + + + {{i18n admin.user.sso.external_avatar_url}} + {{external_avatar_url}} + + {{/with}} + +{{/if}} + diff --git a/app/serializers/admin_user_serializer.rb b/app/serializers/admin_user_serializer.rb index c95b607eb84..dfd429b4d1f 100644 --- a/app/serializers/admin_user_serializer.rb +++ b/app/serializers/admin_user_serializer.rb @@ -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 diff --git a/app/serializers/single_sign_on_record_serializer.rb b/app/serializers/single_sign_on_record_serializer.rb new file mode 100644 index 00000000000..a70591531fe --- /dev/null +++ b/app/serializers/single_sign_on_record_serializer.rb @@ -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 diff --git a/config/locales/client.en.yml b/config/locales/client.en.yml index cf816cc271d..9d2c3f51fc9 100644 --- a/config/locales/client.en.yml +++ b/config/locales/client.en.yml @@ -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."