Browse Source

UI-2921: add way to impersonate users from smart pbx

4.3
Jean-Roch Maitre 8 years ago
parent
commit
265844efcc
4 changed files with 25 additions and 2 deletions
  1. +6
    -2
      i18n/en-US.json
  2. +4
    -0
      submodules/users/users.css
  3. +11
    -0
      submodules/users/users.js
  4. +4
    -0
      views/users-name.html

+ 6
- 2
i18n/en-US.json View File

@ -553,7 +553,7 @@
"deskphone": "A Desk Phone",
"number": "This number",
"placeholder": "+14157283992",
"requireKeyPress": "Leave voicemails on forwarded numbers",
"requireKeyPress": "Require Key Press",
"title": "Call Forwarding",
"timeoutWarning": "In order to leave voicemails on forwarded numbers, your ringing timeout needs to be set to at least 30sec. By saving now, you will automatically be redirected to the user edition where you can update the ringing timeout.",
"__comment": ": Now add a mode for failover for call forward",
@ -735,7 +735,11 @@
"__version": "4.0",
"deleteConferences": "Also remove this user's conferences from the system",
"deleteConferencesHelp": "If you leave this option unchecked, you won't be able to use the user's conference number anywhere else, as it will still be used by that conference."
}
},
"__comment": "UI-2921: Delete User new Dialog",
"__version": "4.2",
"impersonate": "Impersonate"
},
"strategy": {


+ 4
- 0
submodules/users/users.css View File

@ -233,6 +233,10 @@
line-height: 30px;
}
#users_container .actions a {
margin-right: 10px;
}
#users_container .actions .cancel-link {
margin-right: 10px;
}


+ 11
- 0
submodules/users/users.js View File

@ -292,6 +292,8 @@ define(function(require) {
dataUser.extra.adminId = self.userId;
dataUser.extra.canImpersonate = monster.util.canImpersonate(self.accountId);
dataUser.extra.presenceIdOptions = [];
var temp,
@ -777,6 +779,15 @@ define(function(require) {
$(this).parents('.item-row').remove();
});
template.on('click', '#impersonate_user', function() {
var dataUser = $(this).parents('.grid-row').data();
monster.pub('auth.triggerImpersonateUser', {
userId: dataUser.id,
userName: dataUser.name
});
});
template.on('click', '#delete_user', function() {
var dataUser = $(this).parents('.grid-row').data();


+ 4
- 0
views/users-name.html View File

@ -129,6 +129,10 @@
<a id="delete_user" class="monster-link" href="javascript:void(0);"><i class="fa fa-trash-o monster-red"></i>{{ i18n.users.delete }}</a>
{{/compare}}
{{#if extra.canImpersonate}}
<a id="impersonate_user" class="monster-link" href="javascript:void(0);"><i class="fa fa-user monster-blue"></i>{{ i18n.users.impersonate }}</a>
{{/if}}
<div class="pull-right">
<a class="cancel-link monster-link blue" href="javascript:void(0);">{{ i18n.cancel }}</a>
<button type="button" class="monster-button monster-button-success save-user">{{ i18n.saveChanges }}</button>


Loading…
Cancel
Save