2022-07-06 01:41:31 +08:00
|
|
|
<section class="details {{unless this.model.active 'not-activated'}}">
|
2019-01-22 23:44:55 +08:00
|
|
|
<div class="user-controls">
|
2022-07-06 01:41:31 +08:00
|
|
|
{{#if this.model.canViewProfile}}
|
|
|
|
<LinkTo @route="user" @model={{this.model}} class="btn btn-default">
|
2017-07-27 04:25:09 +08:00
|
|
|
{{d-icon "user"}}
|
2019-01-22 23:44:55 +08:00
|
|
|
{{i18n "admin.user.show_public_profile"}}
|
2022-06-30 18:30:50 +08:00
|
|
|
</LinkTo>
|
2016-01-19 23:41:07 +08:00
|
|
|
{{/if}}
|
2018-01-18 02:03:14 +08:00
|
|
|
|
2022-07-06 01:41:31 +08:00
|
|
|
{{#if this.model.can_view_action_logs}}
|
|
|
|
<DButton
|
2023-08-31 17:49:35 +08:00
|
|
|
@action={{fn this.viewActionLogs this.model.username}}
|
2024-12-09 05:14:28 +08:00
|
|
|
@icon="far-rectangle-list"
|
2022-07-06 01:41:31 +08:00
|
|
|
@label="admin.user.action_logs"
|
2023-08-31 17:49:35 +08:00
|
|
|
class="btn-default"
|
2022-07-06 01:41:31 +08:00
|
|
|
/>
|
2017-02-21 20:45:30 +08:00
|
|
|
{{/if}}
|
2022-07-06 01:41:31 +08:00
|
|
|
{{#if this.model.active}}
|
|
|
|
{{#if this.currentUser.admin}}
|
2022-06-30 18:30:50 +08:00
|
|
|
<DButton
|
2023-08-31 17:49:35 +08:00
|
|
|
@action={{this.logOut}}
|
2022-06-30 18:30:50 +08:00
|
|
|
@icon="power-off"
|
|
|
|
@label="admin.user.log_out"
|
2023-08-31 17:49:35 +08:00
|
|
|
class="btn-default"
|
2022-06-30 18:30:50 +08:00
|
|
|
/>
|
2014-09-03 22:41:13 +08:00
|
|
|
{{/if}}
|
2014-08-28 01:52:01 +08:00
|
|
|
{{/if}}
|
2022-07-06 01:41:31 +08:00
|
|
|
<PluginOutlet
|
|
|
|
@name="admin-user-controls-after"
|
2023-01-31 20:58:31 +08:00
|
|
|
@outletArgs={{hash model=this.model}}
|
2022-07-06 01:41:31 +08:00
|
|
|
/>
|
2014-08-28 01:52:01 +08:00
|
|
|
</div>
|
|
|
|
|
2019-01-22 23:44:55 +08:00
|
|
|
<div class="display-row username">
|
2022-07-06 01:41:31 +08:00
|
|
|
<AdminEditableField
|
|
|
|
@name="user.username.title"
|
|
|
|
@value={{this.model.username}}
|
|
|
|
@action={{action "saveUsername"}}
|
|
|
|
@editing={{this.editingUsername}}
|
|
|
|
/>
|
2013-02-06 03:16:51 +08:00
|
|
|
</div>
|
2013-04-20 13:34:11 +08:00
|
|
|
|
2019-05-25 01:39:16 +08:00
|
|
|
<div class="display-row name">
|
2022-07-06 01:41:31 +08:00
|
|
|
<AdminEditableField
|
|
|
|
@name="user.name.title"
|
|
|
|
@value={{this.model.name}}
|
|
|
|
@action={{action "saveName"}}
|
|
|
|
@editing={{this.editingName}}
|
|
|
|
/>
|
2015-09-19 20:13:28 +08:00
|
|
|
</div>
|
|
|
|
|
2023-01-31 20:58:31 +08:00
|
|
|
<PluginOutlet
|
|
|
|
@name="admin-user-below-names"
|
|
|
|
@outletArgs={{hash user=this.model}}
|
|
|
|
/>
|
2018-04-05 03:47:14 +08:00
|
|
|
|
2022-07-06 01:41:31 +08:00
|
|
|
{{#if this.canCheckEmails}}
|
2019-01-22 23:44:55 +08:00
|
|
|
<div class="display-row email">
|
|
|
|
<div class="field">{{i18n "user.email.primary"}}</div>
|
|
|
|
<div class="value">
|
2022-07-06 01:41:31 +08:00
|
|
|
{{#unless this.model.active}}
|
2019-01-22 23:44:55 +08:00
|
|
|
<div class="controls">{{i18n "admin.users.not_verified"}}</div>
|
2014-09-30 04:31:05 +08:00
|
|
|
{{/unless}}
|
2022-07-06 01:41:31 +08:00
|
|
|
{{#if this.model.email}}
|
|
|
|
<a href="mailto:{{this.model.email}}">{{this.model.email}}</a>
|
2014-09-30 04:31:05 +08:00
|
|
|
{{else}}
|
2022-11-23 08:46:35 +08:00
|
|
|
<DButton
|
2023-08-31 17:49:35 +08:00
|
|
|
@action={{fn (route-action "checkEmail") this.model}}
|
2022-11-23 08:46:35 +08:00
|
|
|
@icon="envelope"
|
|
|
|
@label="admin.users.check_email.text"
|
|
|
|
@title="admin.users.check_email.title"
|
2023-08-31 17:49:35 +08:00
|
|
|
class="btn-default"
|
2022-11-23 08:46:35 +08:00
|
|
|
/>
|
2014-09-30 04:31:05 +08:00
|
|
|
{{/if}}
|
|
|
|
</div>
|
2020-07-07 08:20:14 +08:00
|
|
|
<div class="controls">
|
2022-07-06 01:41:31 +08:00
|
|
|
{{#if this.siteSettings.auth_overrides_email}}
|
2021-02-08 18:04:33 +08:00
|
|
|
{{i18n "user.email.auth_override_instructions"}}
|
2022-07-06 01:41:31 +08:00
|
|
|
{{else if this.model.email}}
|
|
|
|
{{html-safe
|
|
|
|
(i18n "admin.user.visit_profile" url=this.preferencesPath)
|
|
|
|
}}
|
2020-07-07 08:20:14 +08:00
|
|
|
{{/if}}
|
|
|
|
</div>
|
2014-09-30 04:31:05 +08:00
|
|
|
</div>
|
2013-04-20 13:34:11 +08:00
|
|
|
|
2019-01-22 23:44:55 +08:00
|
|
|
<div class="display-row secondary-emails">
|
|
|
|
<div class="field">{{i18n "user.email.secondary"}}</div>
|
2018-07-03 19:51:22 +08:00
|
|
|
|
2019-01-22 23:44:55 +08:00
|
|
|
<div class="value">
|
2022-07-06 01:41:31 +08:00
|
|
|
{{#if this.model.email}}
|
|
|
|
{{#if this.model.secondary_emails}}
|
2018-07-03 19:51:22 +08:00
|
|
|
<ul>
|
2022-07-06 01:41:31 +08:00
|
|
|
{{#each this.model.secondary_emails as |email|}}
|
2020-03-09 22:28:31 +08:00
|
|
|
<li><a href="mailto:{{email}}">{{email}}</a></li>
|
2018-07-03 19:51:22 +08:00
|
|
|
{{/each}}
|
|
|
|
</ul>
|
|
|
|
{{else}}
|
2019-01-22 23:44:55 +08:00
|
|
|
{{i18n "user.email.no_secondary"}}
|
2018-07-03 19:51:22 +08:00
|
|
|
{{/if}}
|
|
|
|
{{else}}
|
2022-11-23 08:46:35 +08:00
|
|
|
<DButton
|
2023-08-31 17:49:35 +08:00
|
|
|
@action={{fn (route-action "checkEmail") this.model}}
|
2022-11-23 08:46:35 +08:00
|
|
|
@icon="envelope"
|
|
|
|
@label="admin.users.check_email.text"
|
|
|
|
@title="admin.users.check_email.title"
|
2023-08-31 17:49:35 +08:00
|
|
|
class="btn-default"
|
2022-11-23 08:46:35 +08:00
|
|
|
/>
|
2018-07-03 19:51:22 +08:00
|
|
|
{{/if}}
|
|
|
|
</div>
|
2020-07-07 08:20:14 +08:00
|
|
|
|
|
|
|
<div class="controls">
|
2022-07-06 01:41:31 +08:00
|
|
|
{{#if this.model.email}}
|
|
|
|
{{#if this.model.secondary_emails}}
|
|
|
|
{{#if this.siteSettings.auth_overrides_email}}
|
2021-02-08 18:04:33 +08:00
|
|
|
{{i18n "user.email.auth_override_instructions"}}
|
2020-07-07 08:20:14 +08:00
|
|
|
{{else}}
|
2022-07-06 01:41:31 +08:00
|
|
|
{{html-safe
|
|
|
|
(i18n "admin.user.visit_profile" url=this.preferencesPath)
|
|
|
|
}}
|
2020-07-07 08:20:14 +08:00
|
|
|
{{/if}}
|
|
|
|
{{/if}}
|
|
|
|
{{/if}}
|
|
|
|
</div>
|
2018-07-03 19:51:22 +08:00
|
|
|
</div>
|
|
|
|
|
2016-06-20 18:39:53 +08:00
|
|
|
<div class="display-row bounce-score">
|
2022-07-06 01:41:31 +08:00
|
|
|
<div class="field"><a href={{this.model.bounceLink}}>{{i18n
|
|
|
|
"admin.user.bounce_score"
|
|
|
|
}}</a></div>
|
|
|
|
<div class="value">{{this.model.bounceScore}}</div>
|
2019-01-22 23:44:55 +08:00
|
|
|
<div class="controls">
|
2022-07-06 01:41:31 +08:00
|
|
|
{{#if this.model.canResetBounceScore}}
|
2022-06-30 18:30:50 +08:00
|
|
|
<DButton
|
2023-08-31 17:49:35 +08:00
|
|
|
@action={{this.resetBounceScore}}
|
2022-06-30 18:30:50 +08:00
|
|
|
@label="admin.user.reset_bounce_score.label"
|
|
|
|
@title="admin.user.reset_bounce_score.title"
|
2023-08-31 17:49:35 +08:00
|
|
|
class="btn-default"
|
2022-06-30 18:30:50 +08:00
|
|
|
/>
|
2016-06-20 18:39:53 +08:00
|
|
|
{{/if}}
|
2022-07-06 01:41:31 +08:00
|
|
|
{{this.model.bounceScoreExplanation}}
|
2016-06-20 18:39:53 +08:00
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
|
2019-01-22 23:44:55 +08:00
|
|
|
<div class="display-row associations">
|
|
|
|
<div class="field">{{i18n "user.associated_accounts.title"}}</div>
|
|
|
|
<div class="value">
|
2022-07-06 01:41:31 +08:00
|
|
|
{{#if this.associatedAccountsLoaded}}
|
|
|
|
{{this.associatedAccounts}}
|
2014-09-30 04:31:05 +08:00
|
|
|
{{else}}
|
2022-11-23 08:46:35 +08:00
|
|
|
<DButton
|
2023-08-31 17:49:35 +08:00
|
|
|
@action={{fn (route-action "checkEmail") this.model}}
|
2022-11-23 08:46:35 +08:00
|
|
|
@icon="envelope"
|
|
|
|
@label="admin.users.check_email.text"
|
|
|
|
@title="admin.users.check_email.title"
|
2023-08-31 17:49:35 +08:00
|
|
|
class="btn-default"
|
2022-11-23 08:46:35 +08:00
|
|
|
/>
|
2014-09-30 04:31:05 +08:00
|
|
|
{{/if}}
|
|
|
|
</div>
|
2024-09-27 20:08:05 +08:00
|
|
|
{{#if (and this.currentUser.admin this.associatedAccounts)}}
|
|
|
|
<div class="controls">
|
|
|
|
<DButton
|
|
|
|
@action={{this.deleteAssociatedAccounts}}
|
|
|
|
@icon="trash-can"
|
|
|
|
@label="admin.users.delete_associated_accounts.text"
|
|
|
|
@title="admin.users.delete_associated_accounts.title"
|
|
|
|
class="btn-danger"
|
|
|
|
/>
|
|
|
|
</div>
|
|
|
|
{{/if}}
|
2014-09-30 04:31:05 +08:00
|
|
|
</div>
|
|
|
|
{{/if}}
|
2014-09-25 13:50:54 +08:00
|
|
|
|
2019-01-22 23:44:55 +08:00
|
|
|
<div class="display-row">
|
|
|
|
<div class="field">{{i18n "user.avatar.title"}}</div>
|
2022-07-06 01:41:31 +08:00
|
|
|
<div class="value">{{avatar this.model imageSize="large"}}</div>
|
2017-05-27 03:00:31 +08:00
|
|
|
<div class="controls">
|
2022-07-06 01:41:31 +08:00
|
|
|
{{html-safe (i18n "admin.user.visit_profile" url=this.preferencesPath)}}
|
2017-05-27 03:00:31 +08:00
|
|
|
</div>
|
2013-02-06 03:16:51 +08:00
|
|
|
</div>
|
2013-04-20 13:34:11 +08:00
|
|
|
|
2019-01-22 23:44:55 +08:00
|
|
|
<div class="display-row">
|
2022-07-06 01:41:31 +08:00
|
|
|
<AdminEditableField
|
|
|
|
@name="user.title.title"
|
|
|
|
@value={{this.model.title}}
|
|
|
|
@action={{action "saveTitle"}}
|
|
|
|
@editing={{this.editingTitle}}
|
|
|
|
/>
|
2013-06-26 06:39:20 +08:00
|
|
|
</div>
|
|
|
|
|
2019-01-22 23:44:55 +08:00
|
|
|
<div class="display-row last-ip">
|
|
|
|
<div class="field">{{i18n "user.ip_address.title"}}</div>
|
2022-07-06 01:41:31 +08:00
|
|
|
<div class="value">{{this.model.ip_address}}</div>
|
2019-01-22 23:44:55 +08:00
|
|
|
<div class="controls">
|
2022-07-06 01:41:31 +08:00
|
|
|
{{#if this.currentUser.staff}}
|
|
|
|
<IpLookup @ip={{this.model.ip_address}} @userId={{this.model.id}} />
|
2013-05-02 13:15:17 +08:00
|
|
|
{{/if}}
|
2013-02-06 03:16:51 +08:00
|
|
|
</div>
|
|
|
|
</div>
|
2013-04-20 13:34:11 +08:00
|
|
|
|
2019-01-22 23:44:55 +08:00
|
|
|
<div class="display-row registration-ip">
|
|
|
|
<div class="field">{{i18n "user.registration_ip_address.title"}}</div>
|
2022-07-06 01:41:31 +08:00
|
|
|
<div class="value">{{this.model.registration_ip_address}}</div>
|
2019-01-22 23:44:55 +08:00
|
|
|
<div class="controls">
|
2022-07-06 01:41:31 +08:00
|
|
|
{{#if this.currentUser.staff}}
|
|
|
|
<IpLookup
|
|
|
|
@ip={{this.model.registration_ip_address}}
|
|
|
|
@userId={{this.model.id}}
|
|
|
|
/>
|
2014-06-16 00:14:19 +08:00
|
|
|
{{/if}}
|
|
|
|
</div>
|
2014-04-30 02:37:56 +08:00
|
|
|
</div>
|
|
|
|
|
2022-07-06 01:41:31 +08:00
|
|
|
{{#if this.showBadges}}
|
2019-01-22 23:44:55 +08:00
|
|
|
<div class="display-row">
|
|
|
|
<div class="field">{{i18n "admin.badges.title"}}</div>
|
|
|
|
<div class="value">
|
2022-07-06 01:41:31 +08:00
|
|
|
{{i18n "badges.badge_count" count=this.model.badge_count}}
|
2014-03-19 22:27:21 +08:00
|
|
|
</div>
|
2019-01-22 23:44:55 +08:00
|
|
|
<div class="controls">
|
2022-07-06 01:41:31 +08:00
|
|
|
<LinkTo
|
|
|
|
@route="adminUser.badges"
|
|
|
|
@model={{this.model}}
|
|
|
|
class="btn btn-default"
|
|
|
|
>
|
2019-01-22 23:44:55 +08:00
|
|
|
{{d-icon "certificate"}}
|
|
|
|
{{i18n "admin.badges.edit_badges"}}
|
2022-06-30 18:30:50 +08:00
|
|
|
</LinkTo>
|
2014-03-19 22:27:21 +08:00
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
{{/if}}
|
2017-12-22 09:18:12 +08:00
|
|
|
|
2024-11-08 08:39:42 +08:00
|
|
|
<div class="display-row second-factor">
|
2019-01-22 23:44:55 +08:00
|
|
|
<div class="field">{{i18n "user.second_factor.title"}}</div>
|
|
|
|
<div class="value">
|
2022-07-06 01:41:31 +08:00
|
|
|
{{#if this.model.second_factor_enabled}}
|
2017-12-22 09:18:12 +08:00
|
|
|
{{i18n "yes_value"}}
|
|
|
|
{{else}}
|
|
|
|
{{i18n "no_value"}}
|
|
|
|
{{/if}}
|
|
|
|
</div>
|
2019-01-22 23:44:55 +08:00
|
|
|
<div class="controls">
|
2022-07-06 01:41:31 +08:00
|
|
|
{{#if this.canDisableSecondFactor}}
|
2022-06-30 18:30:50 +08:00
|
|
|
<DButton
|
2023-08-31 17:49:35 +08:00
|
|
|
@action={{this.disableSecondFactor}}
|
2024-09-13 23:50:52 +08:00
|
|
|
@icon="unlock-keyhole"
|
2022-06-30 18:30:50 +08:00
|
|
|
@label="user.second_factor.disable"
|
2024-11-08 08:39:42 +08:00
|
|
|
class="btn-default disable-second-factor"
|
2022-06-30 18:30:50 +08:00
|
|
|
/>
|
2017-12-22 09:18:12 +08:00
|
|
|
{{/if}}
|
|
|
|
</div>
|
|
|
|
</div>
|
2013-02-06 03:16:51 +08:00
|
|
|
</section>
|
|
|
|
|
2022-07-06 01:41:31 +08:00
|
|
|
{{#if this.userFields}}
|
2019-01-22 23:44:55 +08:00
|
|
|
<section class="details">
|
2022-07-06 01:41:31 +08:00
|
|
|
{{#each this.userFields as |uf|}}
|
2019-01-22 23:44:55 +08:00
|
|
|
<div class="display-row">
|
|
|
|
<div class="field">{{uf.name}}</div>
|
|
|
|
<div class="value">
|
2014-12-13 02:28:20 +08:00
|
|
|
{{#if uf.value}}
|
|
|
|
{{uf.value}}
|
2014-09-27 02:48:34 +08:00
|
|
|
{{else}}
|
|
|
|
—
|
|
|
|
{{/if}}
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
{{/each}}
|
|
|
|
</section>
|
|
|
|
{{/if}}
|
|
|
|
|
2023-01-31 19:33:26 +08:00
|
|
|
<span>
|
|
|
|
<PluginOutlet
|
|
|
|
@name="admin-user-details"
|
|
|
|
@connectorTagName="div"
|
2023-01-31 20:58:31 +08:00
|
|
|
@outletArgs={{hash model=this.model}}
|
2023-01-31 19:33:26 +08:00
|
|
|
/>
|
|
|
|
</span>
|
2017-09-07 22:17:27 +08:00
|
|
|
|
2019-01-22 23:44:55 +08:00
|
|
|
<section class="details">
|
|
|
|
<h1>{{i18n "admin.user.permissions"}}</h1>
|
2013-02-06 03:16:51 +08:00
|
|
|
|
2022-07-06 01:41:31 +08:00
|
|
|
{{#if this.siteSettings.must_approve_users}}
|
2019-01-22 23:44:55 +08:00
|
|
|
<div class="display-row">
|
|
|
|
<div class="field">{{i18n "admin.users.approved"}}</div>
|
|
|
|
<div class="value">
|
2022-07-06 01:41:31 +08:00
|
|
|
{{#if this.model.approved}}
|
2019-01-22 23:44:55 +08:00
|
|
|
{{i18n "admin.user.approved_by"}}
|
2022-07-06 01:41:31 +08:00
|
|
|
<LinkTo @route="adminUser" @model={{this.model.approvedBy}}>
|
|
|
|
{{avatar this.model.approvedBy imageSize="small"}}
|
2022-06-30 18:30:50 +08:00
|
|
|
</LinkTo>
|
2022-07-06 01:41:31 +08:00
|
|
|
<LinkTo @route="adminUser" @model={{this.model.approvedBy}}>
|
|
|
|
{{this.model.approvedBy.username}}
|
2022-06-30 18:30:50 +08:00
|
|
|
</LinkTo>
|
2013-09-10 00:21:47 +08:00
|
|
|
{{else}}
|
2019-01-22 23:44:55 +08:00
|
|
|
{{i18n "no_value"}}
|
2013-09-10 00:21:47 +08:00
|
|
|
{{/if}}
|
|
|
|
</div>
|
2019-01-22 23:44:55 +08:00
|
|
|
<div class="controls">
|
2022-07-06 01:41:31 +08:00
|
|
|
{{#if this.model.approved}}
|
2019-01-22 23:44:55 +08:00
|
|
|
{{i18n "admin.user.approve_success"}}
|
2013-09-10 00:21:47 +08:00
|
|
|
{{else}}
|
2022-07-06 01:41:31 +08:00
|
|
|
{{#if this.model.can_approve}}
|
2022-06-30 18:30:50 +08:00
|
|
|
<DButton
|
2023-08-31 17:49:35 +08:00
|
|
|
@action={{this.approve}}
|
2022-06-30 18:30:50 +08:00
|
|
|
@icon="check"
|
|
|
|
@label="admin.user.approve"
|
2023-08-31 17:49:35 +08:00
|
|
|
class="btn-default"
|
2022-06-30 18:30:50 +08:00
|
|
|
/>
|
2013-09-10 00:21:47 +08:00
|
|
|
{{/if}}
|
2013-06-06 12:18:22 +08:00
|
|
|
{{/if}}
|
2013-09-10 00:21:47 +08:00
|
|
|
</div>
|
2013-02-06 03:16:51 +08:00
|
|
|
</div>
|
2013-09-10 00:21:47 +08:00
|
|
|
{{/if}}
|
2013-02-06 03:16:51 +08:00
|
|
|
|
2019-01-22 23:44:55 +08:00
|
|
|
<div class="display-row">
|
|
|
|
<div class="field">{{i18n "admin.users.active"}}</div>
|
2022-07-06 01:41:31 +08:00
|
|
|
<div class="value">{{i18n-yes-no this.model.active}}</div>
|
2019-01-22 23:44:55 +08:00
|
|
|
<div class="controls">
|
2022-07-06 01:41:31 +08:00
|
|
|
{{#if this.model.active}}
|
|
|
|
{{#if this.model.can_deactivate}}
|
2022-06-30 18:30:50 +08:00
|
|
|
<DButton
|
2023-08-31 17:49:35 +08:00
|
|
|
@action={{this.deactivate}}
|
2022-06-30 18:30:50 +08:00
|
|
|
@label="admin.user.deactivate_account"
|
2023-08-31 17:49:35 +08:00
|
|
|
class="btn-default"
|
2022-06-30 18:30:50 +08:00
|
|
|
/>
|
2019-01-22 23:44:55 +08:00
|
|
|
{{i18n "admin.user.deactivate_explanation"}}
|
2013-05-08 09:58:34 +08:00
|
|
|
{{/if}}
|
|
|
|
{{else}}
|
2022-07-06 01:41:31 +08:00
|
|
|
{{#if this.model.can_send_activation_email}}
|
2022-06-30 18:30:50 +08:00
|
|
|
<DButton
|
2023-08-31 17:49:35 +08:00
|
|
|
@action={{this.sendActivationEmail}}
|
2022-06-30 18:30:50 +08:00
|
|
|
@icon="envelope"
|
|
|
|
@label="admin.user.send_activation_email"
|
2023-08-31 17:49:35 +08:00
|
|
|
class="btn-default"
|
2022-06-30 18:30:50 +08:00
|
|
|
/>
|
2013-05-08 09:58:34 +08:00
|
|
|
{{/if}}
|
2022-07-06 01:41:31 +08:00
|
|
|
{{#if this.model.can_activate}}
|
2022-06-30 18:30:50 +08:00
|
|
|
<DButton
|
2023-08-31 17:49:35 +08:00
|
|
|
@action={{this.activate}}
|
2022-06-30 18:30:50 +08:00
|
|
|
@icon="check"
|
|
|
|
@label="admin.user.activate"
|
2023-08-31 17:49:35 +08:00
|
|
|
class="btn-default"
|
2022-06-30 18:30:50 +08:00
|
|
|
/>
|
2013-05-08 09:58:34 +08:00
|
|
|
{{/if}}
|
|
|
|
{{/if}}
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
|
2017-09-27 04:46:37 +08:00
|
|
|
<div class="display-row">
|
2019-01-22 23:44:55 +08:00
|
|
|
<div class="field">{{i18n "admin.user.staged"}}</div>
|
2022-07-06 01:41:31 +08:00
|
|
|
<div class="value">{{i18n-yes-no this.model.staged}}</div>
|
2019-01-22 23:44:55 +08:00
|
|
|
<div class="controls">{{i18n "admin.user.staged_explanation"}}</div>
|
2017-09-27 04:46:37 +08:00
|
|
|
</div>
|
|
|
|
|
2022-07-06 01:41:31 +08:00
|
|
|
{{#if this.currentUser.admin}}
|
2019-01-22 23:44:55 +08:00
|
|
|
<div class="display-row">
|
2019-11-05 22:10:23 +08:00
|
|
|
<div class="field">{{i18n "admin.api.active_keys"}}</div>
|
|
|
|
<div class="value">
|
2022-07-06 01:41:31 +08:00
|
|
|
{{this.model.api_key_count}}
|
2019-11-05 22:10:23 +08:00
|
|
|
</div>
|
|
|
|
<div class="controls">
|
2022-06-30 18:30:50 +08:00
|
|
|
<DButton
|
|
|
|
@href="/admin/api/keys"
|
|
|
|
@label="admin.api.manage_keys"
|
2023-08-31 17:49:35 +08:00
|
|
|
class="btn-default"
|
2022-06-30 18:30:50 +08:00
|
|
|
/>
|
2019-11-05 22:10:23 +08:00
|
|
|
</div>
|
2015-10-15 03:40:23 +08:00
|
|
|
</div>
|
|
|
|
{{/if}}
|
2013-10-23 03:53:08 +08:00
|
|
|
|
2019-01-22 23:44:55 +08:00
|
|
|
<div class="display-row">
|
|
|
|
<div class="field">{{i18n "admin.user.admin"}}</div>
|
2022-07-06 01:41:31 +08:00
|
|
|
<div class="value">{{i18n-yes-no this.model.admin}}</div>
|
2019-01-22 23:44:55 +08:00
|
|
|
<div class="controls">
|
2022-07-06 01:41:31 +08:00
|
|
|
{{#if this.model.can_revoke_admin}}
|
2022-06-30 18:30:50 +08:00
|
|
|
<DButton
|
2023-08-31 17:49:35 +08:00
|
|
|
@action={{this.revokeAdmin}}
|
2024-09-13 23:50:52 +08:00
|
|
|
@icon="shield-halved"
|
2022-06-30 18:30:50 +08:00
|
|
|
@label="admin.user.revoke_admin"
|
2023-08-31 17:49:35 +08:00
|
|
|
class="btn-default"
|
2022-06-30 18:30:50 +08:00
|
|
|
/>
|
2013-02-06 03:16:51 +08:00
|
|
|
{{/if}}
|
2022-07-06 01:41:31 +08:00
|
|
|
{{#if this.model.can_grant_admin}}
|
2022-06-30 18:30:50 +08:00
|
|
|
<DButton
|
2023-08-31 17:49:35 +08:00
|
|
|
@action={{this.grantAdmin}}
|
2024-09-13 23:50:52 +08:00
|
|
|
@icon="shield-halved"
|
2022-06-30 18:30:50 +08:00
|
|
|
@label="admin.user.grant_admin"
|
2023-08-31 17:49:35 +08:00
|
|
|
class="btn-default grant-admin"
|
2022-06-30 18:30:50 +08:00
|
|
|
/>
|
2013-03-21 08:25:41 +08:00
|
|
|
{{/if}}
|
2013-02-06 03:16:51 +08:00
|
|
|
</div>
|
|
|
|
</div>
|
2015-03-18 05:59:05 +08:00
|
|
|
|
2019-01-22 23:44:55 +08:00
|
|
|
<div class="display-row">
|
|
|
|
<div class="field">{{i18n "admin.user.moderator"}}</div>
|
2022-07-06 01:41:31 +08:00
|
|
|
<div class="value">{{i18n-yes-no this.model.moderator}}</div>
|
2019-01-22 23:44:55 +08:00
|
|
|
<div class="controls">
|
2022-07-06 01:41:31 +08:00
|
|
|
{{#if this.model.can_revoke_moderation}}
|
2022-06-30 18:30:50 +08:00
|
|
|
<DButton
|
2023-08-31 17:49:35 +08:00
|
|
|
@action={{this.revokeModeration}}
|
2024-09-13 23:50:52 +08:00
|
|
|
@icon="shield-halved"
|
2022-06-30 18:30:50 +08:00
|
|
|
@label="admin.user.revoke_moderation"
|
2023-08-31 17:49:35 +08:00
|
|
|
class="btn-default"
|
2022-06-30 18:30:50 +08:00
|
|
|
/>
|
2013-02-13 06:58:08 +08:00
|
|
|
{{/if}}
|
2022-07-06 01:41:31 +08:00
|
|
|
{{#if this.model.can_grant_moderation}}
|
2022-06-30 18:30:50 +08:00
|
|
|
<DButton
|
2023-08-31 17:49:35 +08:00
|
|
|
@action={{this.grantModeration}}
|
2024-09-13 23:50:52 +08:00
|
|
|
@icon="shield-halved"
|
2022-06-30 18:30:50 +08:00
|
|
|
@label="admin.user.grant_moderation"
|
2023-08-31 17:49:35 +08:00
|
|
|
class="btn-default"
|
2022-06-30 18:30:50 +08:00
|
|
|
/>
|
2013-03-21 08:25:41 +08:00
|
|
|
{{/if}}
|
2013-02-13 06:58:08 +08:00
|
|
|
</div>
|
2013-02-06 03:16:51 +08:00
|
|
|
</div>
|
2013-07-01 22:22:21 +08:00
|
|
|
|
2019-01-22 23:44:55 +08:00
|
|
|
<div class="display-row">
|
|
|
|
<div class="field">{{i18n "trust_level"}}</div>
|
2013-07-01 22:22:21 +08:00
|
|
|
<div class="value">
|
2022-07-06 01:41:31 +08:00
|
|
|
<ComboBox
|
|
|
|
@content={{this.site.trustLevels}}
|
|
|
|
@nameProperty="detailedName"
|
|
|
|
@value={{this.model.trustLevel.id}}
|
2024-03-07 01:05:03 +08:00
|
|
|
@onChange={{fn (mut this.model.trust_level)}}
|
2022-07-06 01:41:31 +08:00
|
|
|
/>
|
2019-06-26 20:51:45 +08:00
|
|
|
|
2022-07-06 01:41:31 +08:00
|
|
|
{{#if this.model.dirty}}
|
2014-01-23 06:09:56 +08:00
|
|
|
<div>
|
2022-06-30 18:30:50 +08:00
|
|
|
<DButton
|
2023-08-31 17:49:35 +08:00
|
|
|
@action={{this.saveTrustLevel}}
|
2022-06-30 18:30:50 +08:00
|
|
|
@icon="check"
|
2023-08-31 17:49:35 +08:00
|
|
|
class="ok no-text"
|
2022-06-30 18:30:50 +08:00
|
|
|
/>
|
|
|
|
<DButton
|
2023-08-31 17:49:35 +08:00
|
|
|
@action={{this.restoreTrustLevel}}
|
2024-09-13 23:50:52 +08:00
|
|
|
@icon="xmark"
|
2023-08-31 17:49:35 +08:00
|
|
|
class="cancel no-text"
|
2022-06-30 18:30:50 +08:00
|
|
|
/>
|
2014-01-23 06:09:56 +08:00
|
|
|
</div>
|
|
|
|
{{/if}}
|
2013-07-01 22:22:21 +08:00
|
|
|
</div>
|
2014-09-30 11:12:33 +08:00
|
|
|
<div class="controls">
|
2022-07-06 01:41:31 +08:00
|
|
|
{{#if this.model.canLockTrustLevel}}
|
|
|
|
{{#if this.hasLockedTrustLevel}}
|
2017-07-27 04:33:17 +08:00
|
|
|
{{d-icon "lock" title="admin.user.trust_level_locked_tip"}}
|
2022-06-30 18:30:50 +08:00
|
|
|
<DButton
|
2023-08-31 17:49:35 +08:00
|
|
|
@action={{fn this.lockTrustLevel false}}
|
2022-06-30 18:30:50 +08:00
|
|
|
@label="admin.user.unlock_trust_level"
|
2023-08-31 17:49:35 +08:00
|
|
|
class="btn-default"
|
2022-06-30 18:30:50 +08:00
|
|
|
/>
|
2014-09-30 11:12:33 +08:00
|
|
|
{{else}}
|
2017-07-27 04:33:17 +08:00
|
|
|
{{d-icon "unlock" title="admin.user.trust_level_unlocked_tip"}}
|
2022-06-30 18:30:50 +08:00
|
|
|
<DButton
|
2023-08-31 17:49:35 +08:00
|
|
|
@action={{fn this.lockTrustLevel true}}
|
2022-06-30 18:30:50 +08:00
|
|
|
@label="admin.user.lock_trust_level"
|
2023-08-31 17:49:35 +08:00
|
|
|
class="btn-default"
|
2022-06-30 18:30:50 +08:00
|
|
|
/>
|
2014-09-30 11:12:33 +08:00
|
|
|
{{/if}}
|
|
|
|
{{/if}}
|
2022-07-06 01:41:31 +08:00
|
|
|
{{#if this.model.tl3Requirements}}
|
|
|
|
<LinkTo
|
|
|
|
@route="adminUser.tl3Requirements"
|
|
|
|
@model={{this.model}}
|
|
|
|
class="btn btn-default"
|
|
|
|
>
|
2019-01-22 23:44:55 +08:00
|
|
|
{{i18n "admin.user.trust_level_3_requirements"}}
|
2022-06-30 18:30:50 +08:00
|
|
|
</LinkTo>
|
2014-09-30 11:12:33 +08:00
|
|
|
{{/if}}
|
|
|
|
</div>
|
2013-03-21 08:25:41 +08:00
|
|
|
</div>
|
2013-07-01 22:22:21 +08:00
|
|
|
|
2022-07-06 01:41:31 +08:00
|
|
|
<div
|
|
|
|
class="user-suspended display-row
|
|
|
|
{{if this.model.suspended 'highlight-danger'}}"
|
|
|
|
>
|
2019-01-22 23:44:55 +08:00
|
|
|
<div class="field">{{i18n "admin.user.suspended"}}</div>
|
|
|
|
<div class="value">
|
2022-07-06 01:41:31 +08:00
|
|
|
{{i18n-yes-no this.model.suspended}}
|
|
|
|
{{#if this.model.suspended}}
|
|
|
|
{{#unless this.model.suspendedForever}}
|
|
|
|
{{i18n
|
|
|
|
"admin.user.suspended_until"
|
|
|
|
until=this.model.suspendedTillDate
|
|
|
|
}}
|
2018-05-25 22:29:26 +08:00
|
|
|
{{/unless}}
|
|
|
|
{{/if}}
|
|
|
|
</div>
|
2019-01-22 23:44:55 +08:00
|
|
|
<div class="controls">
|
2022-07-06 01:41:31 +08:00
|
|
|
{{#if this.model.suspended}}
|
2022-06-30 18:30:50 +08:00
|
|
|
<DButton
|
2023-08-31 17:49:35 +08:00
|
|
|
@action={{this.unsuspend}}
|
2022-06-30 18:30:50 +08:00
|
|
|
@icon="ban"
|
|
|
|
@label="admin.user.unsuspend"
|
2023-08-31 17:49:35 +08:00
|
|
|
class="btn-danger unsuspend-user"
|
2022-06-30 18:30:50 +08:00
|
|
|
/>
|
2019-01-22 23:44:55 +08:00
|
|
|
{{i18n "admin.user.suspended_explanation"}}
|
2017-09-14 02:11:33 +08:00
|
|
|
{{else}}
|
2022-07-06 01:41:31 +08:00
|
|
|
{{#if this.model.canSuspend}}
|
2022-06-30 18:30:50 +08:00
|
|
|
<DButton
|
2023-08-31 17:49:35 +08:00
|
|
|
@action={{this.showSuspendModal}}
|
2022-06-30 18:30:50 +08:00
|
|
|
@icon="ban"
|
|
|
|
@label="admin.user.suspend"
|
2023-08-31 17:49:35 +08:00
|
|
|
class="btn-danger suspend-user"
|
2022-06-30 18:30:50 +08:00
|
|
|
/>
|
2019-01-22 23:44:55 +08:00
|
|
|
{{i18n "admin.user.suspended_explanation"}}
|
2017-09-14 02:11:33 +08:00
|
|
|
{{/if}}
|
2013-02-06 03:16:51 +08:00
|
|
|
{{/if}}
|
|
|
|
</div>
|
2013-03-21 08:25:41 +08:00
|
|
|
</div>
|
2013-11-01 22:47:03 +08:00
|
|
|
|
2022-07-06 01:41:31 +08:00
|
|
|
{{#if this.model.suspended}}
|
2019-01-22 23:44:55 +08:00
|
|
|
<div class="display-row highlight-danger suspension-info">
|
|
|
|
<div class="field">{{i18n "admin.user.suspended_by"}}</div>
|
|
|
|
<div class="value">
|
2022-07-06 01:41:31 +08:00
|
|
|
<LinkTo @route="adminUser" @model={{this.model.suspendedBy}}>
|
|
|
|
{{avatar this.model.suspendedBy imageSize="tiny"}}
|
2022-06-30 18:30:50 +08:00
|
|
|
</LinkTo>
|
2022-07-06 01:41:31 +08:00
|
|
|
<LinkTo @route="adminUser" @model={{this.model.suspendedBy}}>
|
|
|
|
{{this.model.suspendedBy.username}}
|
2022-06-30 18:30:50 +08:00
|
|
|
</LinkTo>
|
2015-03-18 05:59:05 +08:00
|
|
|
</div>
|
2019-01-22 23:44:55 +08:00
|
|
|
<div class="controls">
|
|
|
|
<b>{{i18n "admin.user.suspend_reason"}}</b>:
|
2022-07-06 01:41:31 +08:00
|
|
|
<div class="full-reason">{{this.model.full_suspend_reason}}</div>
|
2015-03-18 05:59:05 +08:00
|
|
|
</div>
|
2013-11-06 03:41:04 +08:00
|
|
|
</div>
|
2013-11-01 22:47:03 +08:00
|
|
|
{{/if}}
|
|
|
|
|
2022-07-06 01:41:31 +08:00
|
|
|
<div class="display-row {{if this.model.silenced 'highlight-danger'}}">
|
2019-01-22 23:44:55 +08:00
|
|
|
<div class="field">{{i18n "admin.user.silenced"}}</div>
|
|
|
|
<div class="value">
|
2022-07-06 01:41:31 +08:00
|
|
|
{{i18n-yes-no this.model.silenced}}
|
|
|
|
{{#if this.model.silenced}}
|
|
|
|
{{#unless this.model.silencedForever}}
|
|
|
|
{{i18n
|
|
|
|
"admin.user.suspended_until"
|
|
|
|
until=this.model.silencedTillDate
|
|
|
|
}}
|
2017-11-14 02:41:36 +08:00
|
|
|
{{/unless}}
|
|
|
|
{{/if}}
|
|
|
|
</div>
|
2019-01-22 23:44:55 +08:00
|
|
|
<div class="controls">
|
2022-07-06 01:41:31 +08:00
|
|
|
<ConditionalLoadingSpinner
|
|
|
|
@size="small"
|
|
|
|
@condition={{this.model.silencingUser}}
|
|
|
|
>
|
|
|
|
{{#if this.model.silenced}}
|
2022-06-30 18:30:50 +08:00
|
|
|
<DButton
|
2023-08-31 17:49:35 +08:00
|
|
|
@action={{this.unsilence}}
|
2022-06-30 18:30:50 +08:00
|
|
|
@icon="microphone-slash"
|
|
|
|
@label="admin.user.unsilence"
|
2023-08-31 17:49:35 +08:00
|
|
|
class="btn-danger unsilence-user"
|
2022-06-30 18:30:50 +08:00
|
|
|
/>
|
2019-01-22 23:44:55 +08:00
|
|
|
{{i18n "admin.user.silence_explanation"}}
|
2016-01-15 03:42:06 +08:00
|
|
|
{{else}}
|
2024-08-20 20:27:29 +08:00
|
|
|
{{#if this.model.canSilence}}
|
|
|
|
<DButton
|
|
|
|
@action={{this.showSilenceModal}}
|
|
|
|
@icon="microphone-slash"
|
|
|
|
@label="admin.user.silence"
|
|
|
|
class="btn-danger silence-user"
|
|
|
|
/>
|
|
|
|
{{i18n "admin.user.silence_explanation"}}
|
|
|
|
{{/if}}
|
2016-01-15 03:42:06 +08:00
|
|
|
{{/if}}
|
2022-06-30 18:30:50 +08:00
|
|
|
</ConditionalLoadingSpinner>
|
2013-05-31 23:41:40 +08:00
|
|
|
</div>
|
|
|
|
</div>
|
2017-11-14 02:41:36 +08:00
|
|
|
|
2022-07-06 01:41:31 +08:00
|
|
|
{{#if this.model.silenced}}
|
2019-01-22 23:44:55 +08:00
|
|
|
<div class="display-row highlight-danger silence-info">
|
|
|
|
<div class="field">{{i18n "admin.user.silenced_by"}}</div>
|
|
|
|
<div class="value">
|
2022-07-06 01:41:31 +08:00
|
|
|
<LinkTo @route="adminUser" @model={{this.model.silencedBy}}>
|
|
|
|
{{avatar this.model.silencedBy imageSize="tiny"}}
|
2022-06-30 18:30:50 +08:00
|
|
|
</LinkTo>
|
2022-07-06 01:41:31 +08:00
|
|
|
<LinkTo @route="adminUser" @model={{this.model.silencedBy}}>
|
|
|
|
{{this.model.silencedBy.username}}
|
2022-06-30 18:30:50 +08:00
|
|
|
</LinkTo>
|
2017-11-14 02:41:36 +08:00
|
|
|
</div>
|
2019-01-22 23:44:55 +08:00
|
|
|
<div class="controls">
|
|
|
|
<b>{{i18n "admin.user.silence_reason"}}</b>:
|
2022-07-06 01:41:31 +08:00
|
|
|
<div class="full-reason">{{this.model.silence_reason}}</div>
|
2017-11-14 02:41:36 +08:00
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
{{/if}}
|
|
|
|
|
2022-07-06 01:41:31 +08:00
|
|
|
{{#if this.model.tl3_requirements.penalty_counts.total}}
|
2019-01-22 23:44:55 +08:00
|
|
|
<div class="display-row clear-penalty-history">
|
|
|
|
<div class="field">{{i18n "admin.user.penalty_count"}}</div>
|
2022-07-06 01:41:31 +08:00
|
|
|
<div
|
|
|
|
class="value"
|
|
|
|
>{{this.model.tl3_requirements.penalty_counts.total}}</div>
|
|
|
|
{{#if this.currentUser.admin}}
|
2019-01-22 23:44:55 +08:00
|
|
|
<div class="controls">
|
2022-06-30 18:30:50 +08:00
|
|
|
<DButton
|
|
|
|
@label="admin.user.clear_penalty_history.title"
|
2024-09-13 23:50:52 +08:00
|
|
|
@icon="xmark"
|
2023-08-31 17:49:35 +08:00
|
|
|
@action={{this.clearPenaltyHistory}}
|
|
|
|
class="btn-default"
|
2022-06-30 18:30:50 +08:00
|
|
|
/>
|
2018-05-25 23:45:42 +08:00
|
|
|
{{i18n "admin.user.clear_penalty_history.description"}}
|
|
|
|
</div>
|
|
|
|
{{/if}}
|
|
|
|
</div>
|
|
|
|
{{/if}}
|
|
|
|
|
2013-02-06 03:16:51 +08:00
|
|
|
</section>
|
|
|
|
|
2022-07-06 01:41:31 +08:00
|
|
|
{{#if this.currentUser.admin}}
|
2019-01-22 23:44:55 +08:00
|
|
|
<section class="details">
|
|
|
|
<h1>{{i18n "admin.groups.title"}}</h1>
|
|
|
|
<div class="display-row">
|
|
|
|
<div class="field">{{i18n "admin.groups.automatic"}}</div>
|
2022-07-06 01:41:31 +08:00
|
|
|
<div class="value">{{html-safe this.automaticGroups}}</div>
|
2020-04-13 23:17:20 +08:00
|
|
|
</div>
|
2019-01-22 23:44:55 +08:00
|
|
|
<div class="display-row">
|
|
|
|
<div class="field">{{i18n "admin.groups.custom"}}</div>
|
|
|
|
<div class="value">
|
2022-07-06 01:41:31 +08:00
|
|
|
<GroupChooser
|
|
|
|
@content={{this.availableGroups}}
|
|
|
|
@value={{this.customGroupIdsBuffer}}
|
|
|
|
@labelProperty="name"
|
2024-03-07 01:05:03 +08:00
|
|
|
@onChange={{fn (mut this.customGroupIdsBuffer)}}
|
2022-07-06 01:41:31 +08:00
|
|
|
/>
|
2015-03-26 03:16:47 +08:00
|
|
|
</div>
|
2022-07-06 01:41:31 +08:00
|
|
|
{{#if this.customGroupsDirty}}
|
2019-01-22 23:44:55 +08:00
|
|
|
<div class="controls">
|
2023-08-31 17:49:35 +08:00
|
|
|
<DButton @icon="check" @action={{this.saveCustomGroups}} class="ok" />
|
2022-06-30 18:30:50 +08:00
|
|
|
<DButton
|
2024-09-13 23:50:52 +08:00
|
|
|
@icon="xmark"
|
2023-08-31 17:49:35 +08:00
|
|
|
@action={{this.resetCustomGroups}}
|
|
|
|
class="cancel"
|
2022-06-30 18:30:50 +08:00
|
|
|
/>
|
2020-04-13 23:17:20 +08:00
|
|
|
</div>
|
|
|
|
{{/if}}
|
|
|
|
</div>
|
2022-07-06 01:41:31 +08:00
|
|
|
{{#if this.model.customGroups}}
|
2019-01-22 23:44:55 +08:00
|
|
|
<div class="display-row">
|
|
|
|
<div class="field">{{i18n "admin.groups.primary"}}</div>
|
|
|
|
<div class="value">
|
2022-07-06 01:41:31 +08:00
|
|
|
<ComboBox
|
|
|
|
@content={{this.model.customGroups}}
|
|
|
|
@value={{this.model.primary_group_id}}
|
2024-03-07 01:05:03 +08:00
|
|
|
@onChange={{fn (mut this.model.primary_group_id)}}
|
2022-04-06 01:01:09 +08:00
|
|
|
@options={{hash none="admin.groups.no_primary"}}
|
2022-06-30 18:30:50 +08:00
|
|
|
/>
|
2017-04-18 02:53:30 +08:00
|
|
|
</div>
|
2022-07-06 01:41:31 +08:00
|
|
|
{{#if this.primaryGroupDirty}}
|
2019-01-22 23:44:55 +08:00
|
|
|
<div class="controls">
|
2022-06-30 18:30:50 +08:00
|
|
|
<DButton
|
|
|
|
@icon="check"
|
2023-08-31 17:49:35 +08:00
|
|
|
@action={{this.savePrimaryGroup}}
|
|
|
|
class="ok"
|
2022-06-30 18:30:50 +08:00
|
|
|
/>
|
|
|
|
<DButton
|
2024-09-13 23:50:52 +08:00
|
|
|
@icon="xmark"
|
2023-08-31 17:49:35 +08:00
|
|
|
@action={{this.resetPrimaryGroup}}
|
|
|
|
class="cancel"
|
2022-06-30 18:30:50 +08:00
|
|
|
/>
|
2018-10-02 12:34:08 +08:00
|
|
|
</div>
|
|
|
|
{{/if}}
|
|
|
|
</div>
|
2017-04-18 02:53:30 +08:00
|
|
|
{{/if}}
|
|
|
|
</section>
|
|
|
|
{{/if}}
|
2015-03-26 03:16:47 +08:00
|
|
|
|
2019-01-22 23:44:55 +08:00
|
|
|
<section class="details">
|
|
|
|
<h1>{{i18n "admin.user.activity"}}</h1>
|
2013-02-06 03:16:51 +08:00
|
|
|
|
2019-01-22 23:44:55 +08:00
|
|
|
<div class="display-row">
|
|
|
|
<div class="field">{{i18n "created"}}</div>
|
2022-07-06 01:41:31 +08:00
|
|
|
<div class="value">{{format-date
|
|
|
|
this.model.created_at
|
|
|
|
leaveAgo="true"
|
|
|
|
}}</div>
|
2013-02-06 03:16:51 +08:00
|
|
|
</div>
|
2019-01-22 23:44:55 +08:00
|
|
|
<div class="display-row">
|
|
|
|
<div class="field">{{i18n "admin.users.last_emailed"}}</div>
|
2022-07-06 01:41:31 +08:00
|
|
|
<div class="value">{{format-date this.model.last_emailed_at}}</div>
|
2013-02-06 03:16:51 +08:00
|
|
|
</div>
|
2019-01-22 23:44:55 +08:00
|
|
|
<div class="display-row">
|
|
|
|
<div class="field">{{i18n "last_seen"}}</div>
|
2022-07-06 01:41:31 +08:00
|
|
|
<div class="value">{{format-date
|
|
|
|
this.model.last_seen_at
|
|
|
|
leaveAgo="true"
|
|
|
|
}}</div>
|
2013-02-06 03:16:51 +08:00
|
|
|
</div>
|
2019-01-22 23:44:55 +08:00
|
|
|
<div class="display-row">
|
|
|
|
<div class="field">{{i18n "admin.user.like_count"}}</div>
|
2022-07-06 01:41:31 +08:00
|
|
|
<div class="value">{{this.model.like_given_count}}
|
|
|
|
/
|
|
|
|
{{this.model.like_count}}</div>
|
2013-02-06 03:16:51 +08:00
|
|
|
</div>
|
2019-01-22 23:44:55 +08:00
|
|
|
<div class="display-row">
|
|
|
|
<div class="field">{{i18n "admin.user.topics_entered"}}</div>
|
2022-07-06 01:41:31 +08:00
|
|
|
<div class="value">{{this.model.topics_entered}}</div>
|
2013-03-21 08:25:41 +08:00
|
|
|
</div>
|
2019-01-22 23:44:55 +08:00
|
|
|
<div class="display-row">
|
|
|
|
<div class="field">{{i18n "admin.user.post_count"}}</div>
|
2022-07-06 01:41:31 +08:00
|
|
|
<div class="value">{{this.model.post_count}}</div>
|
2019-01-22 23:44:55 +08:00
|
|
|
<div class="controls">
|
2022-07-06 01:41:31 +08:00
|
|
|
{{#if this.model.can_delete_all_posts}}
|
|
|
|
{{#if this.model.post_count}}
|
2022-06-30 18:30:50 +08:00
|
|
|
<DButton
|
2023-08-31 17:49:35 +08:00
|
|
|
@action={{this.showDeletePostsConfirmation}}
|
2024-09-13 23:50:52 +08:00
|
|
|
@icon="trash-can"
|
2022-06-30 18:30:50 +08:00
|
|
|
@label="admin.user.delete_posts.button"
|
2023-08-31 17:49:35 +08:00
|
|
|
class="btn-danger"
|
2022-06-30 18:30:50 +08:00
|
|
|
/>
|
2015-03-17 23:18:39 +08:00
|
|
|
{{/if}}
|
2014-02-21 01:29:40 +08:00
|
|
|
{{else}}
|
2022-07-06 01:41:31 +08:00
|
|
|
{{this.deleteAllPostsExplanation}}
|
2013-02-07 15:11:56 +08:00
|
|
|
{{/if}}
|
|
|
|
</div>
|
2013-02-06 03:16:51 +08:00
|
|
|
</div>
|
2019-01-22 23:44:55 +08:00
|
|
|
<div class="display-row">
|
|
|
|
<div class="field">{{i18n "admin.user.posts_read_count"}}</div>
|
2022-07-06 01:41:31 +08:00
|
|
|
<div class="value">{{this.model.posts_read_count}}</div>
|
2013-03-21 08:25:41 +08:00
|
|
|
</div>
|
2019-01-22 23:44:55 +08:00
|
|
|
<div class="display-row">
|
|
|
|
<div class="field">{{i18n "admin.user.warnings_received_count"}}</div>
|
2022-07-06 01:41:31 +08:00
|
|
|
<div class="value">{{this.model.warnings_received_count}}</div>
|
2014-09-08 23:11:56 +08:00
|
|
|
</div>
|
2019-01-22 23:44:55 +08:00
|
|
|
<div class="display-row">
|
|
|
|
<div class="field">{{i18n "admin.user.flags_given_received_count"}}</div>
|
|
|
|
<div class="value">
|
2022-07-06 01:41:31 +08:00
|
|
|
{{this.model.flags_given_count}}
|
|
|
|
/
|
|
|
|
{{this.model.flags_received_count}}
|
2018-01-18 02:03:14 +08:00
|
|
|
</div>
|
2019-01-22 23:44:55 +08:00
|
|
|
<div class="controls">
|
2022-07-06 01:41:31 +08:00
|
|
|
{{#if this.model.flags_received_count}}
|
|
|
|
<LinkTo
|
|
|
|
@route="review"
|
|
|
|
@query={{hash
|
|
|
|
username=this.model.username
|
|
|
|
type="ReviewableFlaggedPost"
|
2023-10-18 09:38:17 +08:00
|
|
|
status="all"
|
2022-07-06 01:41:31 +08:00
|
|
|
}}
|
|
|
|
class="btn"
|
|
|
|
>
|
2019-01-04 01:03:01 +08:00
|
|
|
{{i18n "admin.user.show_flags_received"}}
|
2022-06-30 18:30:50 +08:00
|
|
|
</LinkTo>
|
2018-01-18 02:03:14 +08:00
|
|
|
{{/if}}
|
|
|
|
</div>
|
2013-03-21 08:25:41 +08:00
|
|
|
</div>
|
2019-01-22 23:44:55 +08:00
|
|
|
<div class="display-row">
|
|
|
|
<div class="field">{{i18n "admin.user.private_topics_count"}}</div>
|
2022-07-06 01:41:31 +08:00
|
|
|
<div class="value">{{this.model.private_topics_count}}</div>
|
2013-02-06 03:16:51 +08:00
|
|
|
</div>
|
2019-01-22 23:44:55 +08:00
|
|
|
<div class="display-row">
|
|
|
|
<div class="field">{{i18n "admin.user.time_read"}}</div>
|
2022-07-06 01:41:31 +08:00
|
|
|
<div class="value">{{format-duration this.model.time_read}}</div>
|
2013-03-21 08:25:41 +08:00
|
|
|
</div>
|
2019-01-22 23:44:55 +08:00
|
|
|
<div class="display-row">
|
|
|
|
<div class="field">{{i18n "user.invited.days_visited"}}</div>
|
2022-07-06 01:41:31 +08:00
|
|
|
<div class="value">{{html-safe this.model.days_visited}}</div>
|
2013-03-21 08:25:41 +08:00
|
|
|
</div>
|
2021-08-02 22:15:53 +08:00
|
|
|
<div class="display-row post-edits-count">
|
|
|
|
<div class="field">{{i18n "admin.user.post_edits_count"}}</div>
|
|
|
|
<div class="value">
|
2022-07-06 01:41:31 +08:00
|
|
|
{{if (gt this.model.post_edits_count 0) this.model.post_edits_count "0"}}
|
2021-08-02 22:15:53 +08:00
|
|
|
</div>
|
|
|
|
<div class="controls">
|
2022-07-06 01:41:31 +08:00
|
|
|
{{#if (gt this.model.post_edits_count 0)}}
|
|
|
|
<LinkTo
|
|
|
|
@route="adminReports.show"
|
|
|
|
@model="post_edits"
|
|
|
|
@query={{hash filters=this.postEditsByEditorFilter}}
|
|
|
|
class="btn btn-icon"
|
|
|
|
>
|
2021-08-02 22:15:53 +08:00
|
|
|
{{d-icon "far-eye"}}
|
|
|
|
{{i18n "admin.user.view_edits"}}
|
2022-06-30 18:30:50 +08:00
|
|
|
</LinkTo>
|
2021-08-02 22:15:53 +08:00
|
|
|
{{/if}}
|
|
|
|
</div>
|
|
|
|
</div>
|
2013-02-06 03:16:51 +08:00
|
|
|
</section>
|
|
|
|
|
2022-07-06 01:41:31 +08:00
|
|
|
{{#if this.model.single_sign_on_record}}
|
2019-01-22 23:44:55 +08:00
|
|
|
<section class="details">
|
2021-02-08 18:04:33 +08:00
|
|
|
<h1>{{i18n "admin.user.discourse_connect.title"}}</h1>
|
2014-08-23 08:34:48 +08:00
|
|
|
|
2022-07-06 01:41:31 +08:00
|
|
|
{{#let this.model.single_sign_on_record as |sso|}}
|
2019-01-22 23:44:55 +08:00
|
|
|
<div class="display-row">
|
2021-02-08 18:04:33 +08:00
|
|
|
<div class="field">{{i18n
|
|
|
|
"admin.user.discourse_connect.external_id"
|
|
|
|
}}</div>
|
2019-01-22 23:44:55 +08:00
|
|
|
<div class="value">{{sso.external_id}}</div>
|
2022-07-06 01:41:31 +08:00
|
|
|
{{#if this.model.can_delete_sso_record}}
|
2020-09-15 22:00:10 +08:00
|
|
|
<div class="controls">
|
2022-06-30 18:30:50 +08:00
|
|
|
<DButton
|
2023-08-31 17:49:35 +08:00
|
|
|
@action={{this.deleteSSORecord}}
|
2024-09-13 23:50:52 +08:00
|
|
|
@icon="trash-can"
|
2022-06-30 18:30:50 +08:00
|
|
|
@label="admin.user.discourse_connect.delete_sso_record"
|
2023-08-31 17:49:35 +08:00
|
|
|
class="btn-danger"
|
2022-06-30 18:30:50 +08:00
|
|
|
/>
|
2020-09-15 22:00:10 +08:00
|
|
|
</div>
|
|
|
|
{{/if}}
|
2018-06-12 16:07:10 +08:00
|
|
|
</div>
|
2019-01-22 23:44:55 +08:00
|
|
|
<div class="display-row">
|
2021-02-08 18:04:33 +08:00
|
|
|
<div class="field">{{i18n
|
|
|
|
"admin.user.discourse_connect.external_username"
|
|
|
|
}}</div>
|
2019-01-22 23:44:55 +08:00
|
|
|
<div class="value">{{sso.external_username}}</div>
|
2020-04-13 23:17:20 +08:00
|
|
|
</div>
|
2019-01-22 23:44:55 +08:00
|
|
|
<div class="display-row">
|
2021-02-08 18:04:33 +08:00
|
|
|
<div class="field">{{i18n
|
|
|
|
"admin.user.discourse_connect.external_name"
|
|
|
|
}}</div>
|
2019-01-22 23:44:55 +08:00
|
|
|
<div class="value">{{sso.external_name}}</div>
|
2020-04-13 23:17:20 +08:00
|
|
|
</div>
|
2022-07-06 01:41:31 +08:00
|
|
|
{{#if this.canAdminCheckEmails}}
|
2019-01-22 23:44:55 +08:00
|
|
|
<div class="display-row">
|
2021-02-08 18:04:33 +08:00
|
|
|
<div class="field">{{i18n
|
|
|
|
"admin.user.discourse_connect.external_email"
|
|
|
|
}}</div>
|
2022-07-06 01:41:31 +08:00
|
|
|
{{#if this.ssoExternalEmail}}
|
|
|
|
<div class="value">{{this.ssoExternalEmail}}</div>
|
2020-11-11 03:12:44 +08:00
|
|
|
{{else}}
|
2022-11-23 08:46:35 +08:00
|
|
|
<DButton
|
2023-08-31 17:49:35 +08:00
|
|
|
@action={{fn this.checkSsoEmail this.model}}
|
2022-11-23 08:46:35 +08:00
|
|
|
@icon="envelope"
|
|
|
|
@label="admin.users.check_email.text"
|
|
|
|
@title="admin.users.check_email.title"
|
2023-08-31 17:49:35 +08:00
|
|
|
class="btn-default"
|
2022-11-23 08:46:35 +08:00
|
|
|
/>
|
2020-11-11 03:12:44 +08:00
|
|
|
{{/if}}
|
2020-04-13 23:17:20 +08:00
|
|
|
</div>
|
|
|
|
{{/if}}
|
2019-01-22 23:44:55 +08:00
|
|
|
<div class="display-row">
|
2021-02-08 18:04:33 +08:00
|
|
|
<div class="field">{{i18n
|
|
|
|
"admin.user.discourse_connect.external_avatar_url"
|
|
|
|
}}</div>
|
2019-01-22 23:44:55 +08:00
|
|
|
<div class="value">{{sso.external_avatar_url}}</div>
|
2014-08-23 08:34:48 +08:00
|
|
|
</div>
|
2022-07-06 01:41:31 +08:00
|
|
|
{{#if this.canAdminCheckEmails}}
|
2020-09-15 22:00:10 +08:00
|
|
|
<div class="display-row">
|
2021-02-08 18:04:33 +08:00
|
|
|
<div class="field">{{i18n
|
|
|
|
"admin.user.discourse_connect.last_payload"
|
|
|
|
}}</div>
|
2022-07-06 01:41:31 +08:00
|
|
|
{{#if this.ssoLastPayload}}
|
2021-02-17 23:57:51 +08:00
|
|
|
<div class="value">
|
2022-07-06 01:41:31 +08:00
|
|
|
{{#each this.ssoPayload as |line|}}
|
2021-02-17 23:57:51 +08:00
|
|
|
{{line}}<br />
|
|
|
|
{{/each}}
|
|
|
|
</div>
|
|
|
|
{{else}}
|
2022-07-06 01:41:31 +08:00
|
|
|
<DButton
|
2023-08-31 17:49:35 +08:00
|
|
|
@action={{fn this.checkSsoPayload this.model}}
|
2024-12-09 05:14:28 +08:00
|
|
|
@icon="far-rectangle-list"
|
2022-07-06 01:41:31 +08:00
|
|
|
@label="admin.users.check_sso.text"
|
|
|
|
@title="admin.users.check_sso.title"
|
2023-08-31 17:49:35 +08:00
|
|
|
class="btn-default"
|
2022-07-06 01:41:31 +08:00
|
|
|
/>
|
2021-02-17 23:57:51 +08:00
|
|
|
{{/if}}
|
2020-09-15 22:00:10 +08:00
|
|
|
</div>
|
|
|
|
{{/if}}
|
2022-05-05 19:16:34 +08:00
|
|
|
{{/let}}
|
2014-08-23 08:34:48 +08:00
|
|
|
</section>
|
|
|
|
{{/if}}
|
|
|
|
|
2023-01-31 19:33:26 +08:00
|
|
|
<span>
|
|
|
|
<PluginOutlet
|
|
|
|
@name="after-user-details"
|
|
|
|
@connectorTagName="div"
|
2023-01-31 20:58:31 +08:00
|
|
|
@outletArgs={{hash model=this.model}}
|
2023-01-31 19:33:26 +08:00
|
|
|
/>
|
|
|
|
</span>
|
2018-04-17 02:41:03 +08:00
|
|
|
|
2013-04-12 04:04:20 +08:00
|
|
|
<section>
|
2017-09-05 00:55:23 +08:00
|
|
|
<hr />
|
2015-03-11 01:06:08 +08:00
|
|
|
<div class="pull-right">
|
2022-07-06 01:41:31 +08:00
|
|
|
{{#if this.model.active}}
|
|
|
|
{{#if this.model.can_impersonate}}
|
2022-06-30 18:30:50 +08:00
|
|
|
<DButton
|
2023-08-31 17:49:35 +08:00
|
|
|
@action={{this.impersonate}}
|
2022-06-30 18:30:50 +08:00
|
|
|
@icon="crosshairs"
|
|
|
|
@label="admin.impersonate.title"
|
|
|
|
@title="admin.impersonate.help"
|
2023-08-31 17:49:35 +08:00
|
|
|
class="btn-danger btn-impersonate"
|
2022-06-30 18:30:50 +08:00
|
|
|
/>
|
2018-03-14 02:35:50 +08:00
|
|
|
{{/if}}
|
|
|
|
{{/if}}
|
|
|
|
|
2022-07-06 01:41:31 +08:00
|
|
|
{{#if this.model.can_be_anonymized}}
|
2022-06-30 18:30:50 +08:00
|
|
|
<DButton
|
|
|
|
@label="admin.user.anonymize"
|
2024-09-13 23:50:52 +08:00
|
|
|
@icon="triangle-exclamation"
|
2023-08-31 17:49:35 +08:00
|
|
|
@action={{this.anonymize}}
|
|
|
|
class="btn-danger btn-anonymize"
|
2022-06-30 18:30:50 +08:00
|
|
|
/>
|
2018-05-25 23:33:01 +08:00
|
|
|
{{/if}}
|
2015-03-11 01:06:08 +08:00
|
|
|
|
2022-07-06 01:41:31 +08:00
|
|
|
{{#if this.model.canBeDeleted}}
|
2022-06-30 18:30:50 +08:00
|
|
|
<DButton
|
|
|
|
@label="admin.user.delete"
|
2024-09-13 23:50:52 +08:00
|
|
|
@icon="trash-can"
|
2023-08-31 17:49:35 +08:00
|
|
|
@action={{this.destroyUser}}
|
|
|
|
class="btn-danger btn-user-delete"
|
2022-06-30 18:30:50 +08:00
|
|
|
/>
|
2020-04-22 20:12:09 +08:00
|
|
|
{{/if}}
|
|
|
|
|
2022-07-06 01:41:31 +08:00
|
|
|
{{#if this.model.can_be_merged}}
|
2022-06-30 18:30:50 +08:00
|
|
|
<DButton
|
|
|
|
@label="admin.user.merge.button"
|
2024-09-13 23:50:52 +08:00
|
|
|
@icon="left-right"
|
2023-08-31 17:49:35 +08:00
|
|
|
@action={{this.promptTargetUser}}
|
|
|
|
class="btn-danger btn-user-merge"
|
2022-06-30 18:30:50 +08:00
|
|
|
/>
|
2018-05-25 23:33:01 +08:00
|
|
|
{{/if}}
|
2015-03-11 01:06:08 +08:00
|
|
|
</div>
|
|
|
|
|
2022-07-06 01:41:31 +08:00
|
|
|
{{#if this.deleteExplanation}}
|
2013-12-21 00:36:43 +08:00
|
|
|
<div class="clearfix"></div>
|
2017-09-05 00:55:23 +08:00
|
|
|
<br />
|
2015-03-18 05:59:05 +08:00
|
|
|
<div class="pull-right">
|
2024-09-13 23:50:52 +08:00
|
|
|
{{d-icon "triangle-exclamation"}}
|
2022-07-06 01:41:31 +08:00
|
|
|
{{this.deleteExplanation}}
|
2015-03-18 05:59:05 +08:00
|
|
|
</div>
|
2013-12-21 00:36:43 +08:00
|
|
|
{{/if}}
|
2013-04-12 04:04:20 +08:00
|
|
|
</section>
|
2019-01-22 23:44:55 +08:00
|
|
|
|
2013-04-12 04:04:20 +08:00
|
|
|
<div class="clearfix"></div>
|