Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[MNOE-1275] Impersonate button should be disabled unless user is active #326

Open
wants to merge 1 commit into
base: 2.0
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,9 @@
vm.isImpersonationEnabled = MnoeAdminConfig.isImpersonationEnabled()

vm.impersonationStatus = ->
if vm.user.admin_role
if !vm.user.confirmed
'unauthorized'
else if vm.user.admin_role
'disabled'
else if MnoeAdminConfig.isImpersonationConsentRequired()
switch vm.user.access_request_status
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,7 @@
<div ng-switch-when="disabled" uib-tooltip="{{ 'mnoe_admin_panel.dashboard.users.widget.local_list.disabled_tooltip' | translate }}" tooltip-enable="vm.user" style="display:inline-block; cursor: not-allowed;">
<button disabled class="{{vm.btnClassNames}}" style="pointer-events: none;" translate>mnoe_admin_panel.dashboard.users.widget.local_list.login_as</button>
</div>
<div ng-switch-when="unauthorized" uib-tooltip="{{ 'mnoe_admin_panel.dashboard.users.widget.local_list.disabled_tooltip_unauthorized' | translate }}" tooltip-enable="vm.user" style="display:inline-block; cursor: not-allowed;">
<button disabled class="{{vm.btnClassNames}}" style="pointer-events: none;" translate>mnoe_admin_panel.dashboard.users.widget.local_list.login_as</button>
</div>
</div>
1 change: 1 addition & 0 deletions src/locales/en-AU.json
Original file line number Diff line number Diff line change
Expand Up @@ -314,6 +314,7 @@
"mnoe_admin_panel.dashboard.users.widget.local_list.active": "Active",
"mnoe_admin_panel.dashboard.users.widget.local_list.login_as": "Log In as...",
"mnoe_admin_panel.dashboard.users.widget.local_list.disabled_tooltip": "This user is a staff member",
"mnoe_admin_panel.dashboard.users.widget.local_list.disabled_tooltip_unauthorized": "This user has not accepted their invitation",
"mnoe_admin_panel.dashboard.users.widget.local_list.request_access": "Request Access",
"mnoe_admin_panel.dashboard.users.widget.local_list.request_access.toastr_success": "{username}'s access has been requested.",
"mnoe_admin_panel.dashboard.users.widget.local_list.request_access.toastr_error": "An error occurred: {username} access has not been requested.",
Expand Down