Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
10
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Open sidebar
LemonLDAP NG
lemonldap-ng
Commits
c22966a8
Commit
c22966a8
authored
Nov 01, 2017
by
Yadd
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Cache for specific menu app rules (
#595
)
parent
9895cc2d
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
3 deletions
+12
-3
lemonldap-ng-portal/lib/Lemonldap/NG/Portal/Main/Menu.pm
lemonldap-ng-portal/lib/Lemonldap/NG/Portal/Main/Menu.pm
+12
-3
No files found.
lemonldap-ng-portal/lib/Lemonldap/NG/Portal/Main/Menu.pm
View file @
c22966a8
...
...
@@ -31,6 +31,8 @@ has menuModules => (
}
);
has
specific
=>
(
is
=>
'
rw
',
default
=>
sub
{
{}
}
);
has
imgPath
=>
(
is
=>
'
rw
',
lazy
=>
1
,
...
...
@@ -419,10 +421,17 @@ sub _filterHash {
next
if
(
$appdisplay
=~
/^(yes|on)$/
);
my
$cond
=
undef
;
# If a specific rule exists, get it from cache or compile it
if
(
$appdisplay
!~
/^auto$/i
)
{
$cond
=
$self
->
p
->
HANDLER
->
buildSub
(
$self
->
p
->
HANDLER
->
substitute
(
$appdisplay
)
);
if
(
$self
->
specific
->
{
$appuri
}
)
{
$cond
=
$self
->
specific
->
{
$appuri
};
}
else
{
$cond
=
$self
->
specific
->
{
$appuri
}
=
$self
->
p
->
HANDLER
->
buildSub
(
$self
->
p
->
HANDLER
->
substitute
(
$appdisplay
)
);
}
}
# Check grant function if display is "auto" (this is the default)
...
...
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