Sort real and spoofed attributes in Session explorer (#1730)

environments/ppa-mbqj77/deployments/736^2
Christophe Maudoux 6 years ago
parent 789cbbb340
commit 2c22327fe7
  1. 3
      lemonldap-ng-manager/lib/Lemonldap/NG/Manager.pm
  2. 3
      lemonldap-ng-manager/lib/Lemonldap/NG/Manager/Sessions.pm
  3. 3
      lemonldap-ng-manager/site/coffee/sessions.coffee
  4. 3
      lemonldap-ng-manager/site/htdocs/static/js/sessions.js
  5. 2
      lemonldap-ng-manager/site/htdocs/static/js/sessions.min.js

@ -141,9 +141,12 @@ sub tplParams {
sub javascript {
my ( $self, $req ) = @_;
my $res = $self->diffRule->( $req, $req->{userData} ) || 0;
my $impPrefix = $self->{impersonationPrefix};
return
'var formPrefix=staticPrefix+"forms/";var confPrefix=scriptname+"confs/";var viewPrefix=scriptname+"view/";'
. 'var allowDiff=' . "$res;"
. 'var impPrefix=' . "'" . $impPrefix . "'" . ';'
. ( $self->links ? 'var links=' . to_json( $self->links ) . ';' : '' )
. (
$self->menuLinks

@ -17,7 +17,7 @@ use feature 'state';
extends 'Lemonldap::NG::Common::Conf::AccessLib',
'Lemonldap::NG::Common::Session::REST';
our $VERSION = '2.0.2';
our $VERSION = '2.0.4';
#############################
# I. INITIALIZATION METHODS #
@ -53,6 +53,7 @@ sub addRoutes {
$self->{ipField} ||= 'ipAddr';
$self->{multiValuesSeparator} ||= '; ';
$self->{impersonationPrefix} = $conf->{impersonationPrefix} || 'real_';
$self->{hiddenAttributes} //= "_password";
}

@ -107,6 +107,7 @@ llapp.controller 'SessionsExplorerCtrl', ['$scope', '$translator', '$location',
$scope.staticPrefix = staticPrefix
$scope.scriptname = scriptname
$scope.formPrefix = formPrefix
$scope.impPrefix = impPrefix
$scope.availableLanguages = availableLanguages
$scope.waiting = true
$scope.showM = false
@ -324,7 +325,7 @@ llapp.controller 'SessionsExplorerCtrl', ['$scope', '$translator', '$location',
real = []
spoof = []
for element in tmp
if element.title.match(new RegExp('^real_.+$'))
if element.title.match(new RegExp('^' + $scope.impPrefix + '.+$'))
console.log element, '-> real attribute'
real.push element
else

@ -130,6 +130,7 @@
$scope.staticPrefix = staticPrefix;
$scope.scriptname = scriptname;
$scope.formPrefix = formPrefix;
$scope.impPrefix = impPrefix;
$scope.availableLanguages = availableLanguages;
$scope.waiting = true;
$scope.showM = false;
@ -400,7 +401,7 @@
spoof = [];
for (p = 0, len5 = tmp.length; p < len5; p++) {
element = tmp[p];
if (element.title.match(new RegExp('^real_.+$'))) {
if (element.title.match(new RegExp('^' + $scope.impPrefix + '.+$'))) {
console.log(element, '-> real attribute');
real.push(element);
} else {

File diff suppressed because one or more lines are too long
Loading…
Cancel
Save