mirror of
https://gitlab.easter-eggs.com/ee/ldapsaisie.git
synced 2024-11-22 09:59:06 +01:00
LSaddon::orgchart: add parameter to control access to the orchart
This commit is contained in:
parent
7c48b8062b
commit
1a2fe50ba2
2 changed files with 6 additions and 2 deletions
|
@ -70,3 +70,6 @@ EOF;
|
||||||
|
|
||||||
// Additional CSS files to load on chart page
|
// Additional CSS files to load on chart page
|
||||||
$GLOBALS['ORGCHART_ADDITIONAL_CSS_FILES'] = array();
|
$GLOBALS['ORGCHART_ADDITIONAL_CSS_FILES'] = array();
|
||||||
|
|
||||||
|
// List of LSprofiles that can access to OrgChart (leave empty for no access control)
|
||||||
|
$GLOBALS['ORGCHART_ALLOWED_PROFILES'] = array();
|
||||||
|
|
|
@ -42,6 +42,7 @@ function LSaddon_orgchart_support() {
|
||||||
$MUST_DEFINE_ARRAY = array(
|
$MUST_DEFINE_ARRAY = array(
|
||||||
'ORGCHART_ENTITY_OBJECT_TYPES',
|
'ORGCHART_ENTITY_OBJECT_TYPES',
|
||||||
'ORGCHART_ADDITIONAL_CSS_FILES',
|
'ORGCHART_ADDITIONAL_CSS_FILES',
|
||||||
|
'ORGCHART_ALLOWED_PROFILES',
|
||||||
);
|
);
|
||||||
foreach($MUST_DEFINE_ARRAY as $array) {
|
foreach($MUST_DEFINE_ARRAY as $array) {
|
||||||
if (!isset($GLOBALS[$array]) || !is_array($GLOBALS[$array])) {
|
if (!isset($GLOBALS[$array]) || !is_array($GLOBALS[$array])) {
|
||||||
|
@ -66,7 +67,7 @@ function LSaddon_orgchart_support() {
|
||||||
'orgchart',
|
'orgchart',
|
||||||
_('Organizational chart'),
|
_('Organizational chart'),
|
||||||
'organizationalChartPage',
|
'organizationalChartPage',
|
||||||
null, // No access crontol
|
($GLOBALS['ORGCHART_ALLOWED_PROFILES']?$GLOBALS['ORGCHART_ALLOWED_PROFILES']:null),
|
||||||
true // Show in menu
|
true // Show in menu
|
||||||
) &&
|
) &&
|
||||||
LSsession :: registerLSaddonView(
|
LSsession :: registerLSaddonView(
|
||||||
|
@ -74,7 +75,7 @@ function LSaddon_orgchart_support() {
|
||||||
'orgchartdata',
|
'orgchartdata',
|
||||||
_('Organizational chart data'),
|
_('Organizational chart data'),
|
||||||
'organizationalChartData',
|
'organizationalChartData',
|
||||||
null, // No access crontol
|
($GLOBALS['ORGCHART_ALLOWED_PROFILES']?$GLOBALS['ORGCHART_ALLOWED_PROFILES']:null),
|
||||||
false // Show in menu
|
false // Show in menu
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
|
|
Loading…
Reference in a new issue