0
1
Fork 0

Supplant bug solved

This commit is contained in:
Juan Ferrer Toribio 2017-11-27 16:27:13 +01:00
parent 426660b31d
commit 0b28f71e0d
10 changed files with 61 additions and 73 deletions

2
debian/changelog vendored
View File

@ -1,4 +1,4 @@
hedera-web (1.405.16) stable; urgency=low
hedera-web (1.405.17) stable; urgency=low
* Initial Release.

View File

@ -1,12 +1,7 @@
{
"UserManagement": "Gestió d'usuaris"
"User management": "Gestió d'usuaris"
,"UserName:": "Nom d'usuari:"
,"UserNumber": "N usuari"
,"UserName": "Nom d'usuari"
,"Alias": "Alias"
,"AccessAsUser": "Suplantar usuari"
,"AccessLog": "Registre d'accessos"
,"Disabled": "Deshabilitat"
,"Impersonate user": "Suplantar usuari"
,"Access log": "Registre d'accessos"
}

View File

@ -1,12 +1,7 @@
{
"UserManagement": "User management"
,"UserName:": "Username:"
,"UserNumber": "User number"
,"UserName": "Username"
,"Alias": "Alias"
"User management": "User management"
,"AccessAsUser": "Impersonate user"
,"AccessLog": "Access log"
,"Disabled": "Disabled"
,"Impersonate user": "Impersonate user"
,"Access log": "Access log"
}

View File

@ -1,12 +1,7 @@
{
"UserManagement": "Gestión de usuarios"
,"UserName:": "Nombre de usuario:"
,"UserNumber": "Nº usuario"
,"UserName": "Nombre de usuario"
,"Alias": "Alias"
"User management": "Gestión de usuarios"
,"AccessAsUser": "Suplantar usuario"
,"AccessLog": "Registro de accesos"
,"Disabled": "Desactivado"
,"Impersonate user": "Suplantar usuario"
,"Access log": "Registro de accesos"
}

View File

@ -1,12 +1,7 @@
{
"UserManagement": "Gestion des utilisateurs"
,"UserName:": "Nom d'utilisateur:"
,"UserNumber": "Numéro utilisateurs"
,"UserName": "Nom d'utilisateur"
,"Alias": "Alias"
,"AccessAsUser": "Accès utilisateur"
,"AccessLog": "Journal des accès"
"User management": "Gestion des utilisateurs"
,"Disabled": "Désactivé"
,"Impersonate user": "Accès utilisateur"
,"Access log": "Journal des accès"
}

View File

@ -1,12 +1,7 @@
{
"UserManagement": "User management"
,"UserName:": "Username:"
,"UserNumber": "User number"
,"UserName": "Username"
,"Alias": "Alias"
"User management": "User management"
,"AccessAsUser": "Impersonate user"
,"AccessLog": "Access log"
,"Disabled": "Disabled"
,"Impersonate user": "Impersonate user"
,"Access log": "Access log"
}

View File

@ -1,12 +1,7 @@
{
"UserManagement": "Gestão de usuarios"
,"UserName:": "Nome de usuario:"
,"UserNumber": "Nº usuario"
,"UserName": "Nome de usuario"
,"Alias": "Alias"
"User management": "Gestão de usuarios"
,"AccessAsUser": "Suplantar usuario"
,"AccessLog": "Registro de acessos"
,"Disabled": "Desativado"
,"Impersonate user": "Suplantar usuario"
,"Access log": "Registro de acessos"
}

View File

@ -25,6 +25,16 @@
{
font-size: 1.2em;
}
.users-box > .disabled
{
float: right;
color: white;
background-color: #F66;
border-radius: .2em;
padding: .2em;
margin: .3em;
font-size: .8em;
}
/* Topbar */

View File

@ -4,7 +4,7 @@
<vn-hash-param key="user" param="user-name"/>
</vn-group>
<div id="title">
<h1><t>UserManagement</t></h1>
<h1><t>User management</t></h1>
</div>
<div id="actions">
<htk-search-entry
@ -12,7 +12,7 @@
</div>
<div id="form" class="users">
<div class="box">
<htk-repeater form-id="iter">
<htk-repeater form-id="iter" renderer="rendererFunc">
<db-model property="model">
<custom>
SELECT u.id, u.name, u.nickname, u.active
@ -33,20 +33,24 @@
<htk-button
form="iter"
column="id"
tip="_AccessAsUser"
icon="incognito"
on-click="onChangeUserClick"/>
<htk-button
form="iter"
column="id"
tip="_AccessLog"
tip="_Access log"
icon="gnome"
on-click="onAccessLogClick"/>
<htk-button
id="impersonate"
form="iter"
column="id"
tip="_Impersonate user"
icon="incognito"
on-click="onChangeUserClick"/>
<span id="disabled" class="disabled">
<t>Disabled</t>
</span>
<p class="important">
<htk-text form="iter" column="nickname"/>
</p>
<p>
<htk-text form="iter" column="id"/> -
@<htk-text form="iter" column="id"/> -
<htk-text form="iter" column="name"/>
</p>
<div class="clear"/>

View File

@ -11,15 +11,19 @@ Hedera.Users = new Class
});
}
,rendererFunc: function (scope, form)
{
var isEnabled = form.get('active')
scope.$('disabled').style.display = isEnabled ?
'none' : 'block';
scope.$('impersonate').node.style.display = isEnabled ?
'block' : 'none';
}
,onChangeUserClick: function (button, form)
{
console.log (form.get ('active'));
if (form.get ('active'))
this.gui.supplantUser (form.get ('name'),
this.onUserSupplant.bind (this));
else
Htk.Toast.showError (_('The user account is disabled'));
this.gui.supplantUser (form.get ('name'),
this.onUserSupplant.bind (this));
}
,onUserSupplant: function (userName)