Skip to content
GitLab
Explore
Projects
Groups
Topics
Snippets
Projects
Groups
Topics
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
fusiondirectory
fusiondirectory
Commits
e8a776be
Unverified
Commit
e8a776be
authored
5 years ago
by
Côme Chilliet
Browse files
Options
Download
Patches
Plain Diff
fix(acl) Reset pluglist menu cache when (re)loading ACLs
issue
#5531
parent
ec9bb549
dev
6342-update-the-locales-for-1-5
6344-template-issue-when-creating-a-template-with-empty-password-error-message-should-not-be-seen
6365-core-locking-mechanism-is-not-changing-the-mail-ressource-it-does-lock-the-mail-account
6365-core-when-lock-mechanism-is-trigger-the-user-should-not-be-editable-if-not-unlock
6378-orcid-test-method-is-wrong-and-break-orcid-saving
core-php8
master
fusiondirectory-1.5
fusiondirectory-1.4
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
include/class_pluglist.inc
+18
-7
include/class_pluglist.inc
include/class_userinfo.inc
+7
-1
include/class_userinfo.inc
with
25 additions
and
8 deletions
+25
-8
include/class_pluglist.inc
+
18
−
7
View file @
e8a776be
<?php
<?php
/*
/*
This code is part of FusionDirectory (http://www.fusiondirectory.org/)
This code is part of FusionDirectory (http://www.fusiondirectory.org/)
Copyright (C) 2003-2010 Cajus Pollmeier
Copyright (C) 2003-2010 Cajus Pollmeier
Copyright (C) 2011-201
6
FusionDirectory
Copyright (C) 2011-201
9
FusionDirectory
This program is free software; you can redistribute it and/or modify
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
it under the terms of the GNU General Public License as published by
...
@@ -33,9 +32,8 @@
...
@@ -33,9 +32,8 @@
*/
*/
class
pluglist
class
pluglist
{
{
var
$menu
=
""
;
var
$menu
=
''
;
var
$iconmenu
=
""
;
protected
$iconmenu
=
''
;
var
$current
=
""
;
/*!
/*!
* \brief The plInfo result for all plugin, using class as key.
* \brief The plInfo result for all plugin, using class as key.
...
@@ -56,8 +54,8 @@ class pluglist
...
@@ -56,8 +54,8 @@ class pluglist
/*!
/*!
* \brief List plugin indexes of all plugin that the user have acl for
* \brief List plugin indexes of all plugin that the user have acl for
*/
*/
var
$allowed_plugins
=
[];
protected
$allowed_plugins
=
[];
var
$silly_cache
=
[];
protected
$silly_cache
=
[];
/*!
/*!
* \brief List the plugins
* \brief List the plugins
...
@@ -506,6 +504,19 @@ class pluglist
...
@@ -506,6 +504,19 @@ class pluglist
return
isset
(
$this
->
allowed_plugins
[
$plug_id
]);
return
isset
(
$this
->
allowed_plugins
[
$plug_id
]);
}
}
/*!
* \brief Resets menu and ACL cache
*
* Called when user ACL rights may have changed
*/
public
function
resetCache
()
{
$this
->
menu
=
''
;
$this
->
iconmenu
=
''
;
$this
->
silly_cache
=
[];
$this
->
allowed_plugins
=
[];
}
static
function
pluginInfos
(
$cname
)
static
function
pluginInfos
(
$cname
)
{
{
$plist
=
session
::
get
(
'plist'
);
$plist
=
session
::
get
(
'plist'
);
...
...
This diff is collapsed.
Click to expand it.
include/class_userinfo.inc
+
7
−
1
View file @
e8a776be
...
@@ -129,7 +129,8 @@ class userinfo
...
@@ -129,7 +129,8 @@ class userinfo
*/
*/
function
loadACL
()
function
loadACL
()
{
{
global
$config
;
global
$config
,
$plist
;
$this
->
ACL
=
[];
$this
->
ACL
=
[];
$this
->
groups
=
[];
$this
->
groups
=
[];
$this
->
roles
=
[];
$this
->
roles
=
[];
...
@@ -330,6 +331,11 @@ class userinfo
...
@@ -330,6 +331,11 @@ class userinfo
if
(
isset
(
$all_acl
[
$dn
]))
{
if
(
isset
(
$all_acl
[
$dn
]))
{
$this
->
ACLperPath
[
$this
->
dn
]
=
$all_acl
[
$dn
];
$this
->
ACLperPath
[
$this
->
dn
]
=
$all_acl
[
$dn
];
}
}
/* Reset plist menu and ACL cache if needed */
if
(
is_object
(
$plist
))
{
$plist
->
resetCache
();
}
}
}
/*!
/*!
...
...
This diff is collapsed.
Click to expand it.
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment
Menu
Explore
Projects
Groups
Topics
Snippets