Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
7
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Open sidebar
Maxime Besson
lemonldap-ng
Commits
e1aa654b
Commit
e1aa654b
authored
Mar 12, 2019
by
Christophe Maudoux
🐛
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Display session at first access (#1658)
parent
772b82cd
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
38 additions
and
7 deletions
+38
-7
lemonldap-ng-portal/lib/Lemonldap/NG/Portal/Plugins/CheckUser.pm
...ap-ng-portal/lib/Lemonldap/NG/Portal/Plugins/CheckUser.pm
+38
-7
No files found.
lemonldap-ng-portal/lib/Lemonldap/NG/Portal/Plugins/CheckUser.pm
View file @
e1aa654b
...
...
@@ -226,16 +226,47 @@ sub check {
sub
display
{
my
(
$self
,
$req
)
=
@_
;
my
(
$attrs
,
$array_attrs
)
=
(
{},
[]
);
$self
->
userLogger
->
notice
("
Retrieve session from Sessions database
");
$self
->
userLogger
->
warn
("
Using spoofed SSO groups if exist!!!
")
if
(
$self
->
conf
->
{
impersonationRule
}
);
$attrs
=
$req
->
userData
;
# Create an array of hashes for template loop
$self
->
logger
->
debug
("
Delete hidden or empty attributes
");
if
(
$self
->
conf
->
{
checkUserDisplayEmptyValues
}
)
{
foreach
my
$k
(
sort
keys
%$attrs
)
{
# Ignore hidden attributes
push
@$array_attrs
,
{
key
=>
$k
,
value
=>
$attrs
->
{
$k
}
}
unless
(
$self
->
hAttr
=~
/\b$k\b/
);
}
}
else
{
foreach
my
$k
(
sort
keys
%$attrs
)
{
# Ignore hidden attributes and empty values
push
@$array_attrs
,
{
key
=>
$k
,
value
=>
$attrs
->
{
$k
}
}
unless
(
$self
->
hAttr
=~
/\b$k\b/
or
!
$attrs
->
{
$k
}
);
}
}
# ARRAY_REF = [ A_REF GROUPS, A_REF MACROS, A_REF OTHERS ]
$array_attrs
=
$self
->
_splitAttributes
(
$array_attrs
);
# Display form
my
$params
=
{
PORTAL
=>
$self
->
conf
->
{
portal
},
MAIN_LOGO
=>
$self
->
conf
->
{
portalMainLogo
},
LANGS
=>
$self
->
conf
->
{
showLanguages
},
MSG
=>
'
checkUser
',
ALERTE
=>
'
alert-info
',
LOGIN
=>
'',
TOKEN
=>
(
PORTAL
=>
$self
->
conf
->
{
portal
},
MAIN_LOGO
=>
$self
->
conf
->
{
portalMainLogo
},
LANGS
=>
$self
->
conf
->
{
showLanguages
},
MSG
=>
'
checkUser
',
ALERTE
=>
'
alert-info
',
LOGIN
=>
$req
->
{
userData
}
->
{
uid
},
ATTRIBUTES
=>
$array_attrs
->
[
2
],
MACROS
=>
$array_attrs
->
[
1
],
GROUPS
=>
$array_attrs
->
[
0
],
TOKEN
=>
(
$self
->
conf
->
{
requireToken
}
?
$self
->
ott
->
createToken
(
$req
->
userData
)
:
''
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment