diff --git a/htdocs/modulebuilder/index.php b/htdocs/modulebuilder/index.php
index c0be68b89cb..e02e3d191cb 100644
--- a/htdocs/modulebuilder/index.php
+++ b/htdocs/modulebuilder/index.php
@@ -2505,7 +2505,7 @@ if ($dirins && $action == 'addmenu' && empty($cancel)) {
'langs' => strtolower($module)."@".strtolower($module),
'position' => '',
'enabled' => GETPOST('enabled', 'alpha'),
- 'perms' => GETPOST('perms', 'alpha'),
+ 'perms' => '$user->hasRight("'.strtolower($module).'", "'.GETPOST('objects', 'alpha').'", "'.GETPOST('perms', 'alpha').'")',
'target' => GETPOST('target', 'alpha'),
'user' => GETPOST('user', 'alpha'),
);
@@ -4350,6 +4350,17 @@ if ($module == 'initmodule') {
$permissions = $moduleobj->rights;
$crud = array('read'=>'CRUDRead', 'write'=>'CRUDCreateWrite', 'delete'=>'Delete');
+ //grouped permissions
+ $groupedRights = array();
+ foreach ($permissions as $right) {
+ $key = $right[4];
+ if (!isset($groupedRights[$key])) {
+ $groupedRights[$key] = array();
+ }
+ $groupedRights[$key][] = $right;
+ }
+ $groupedRights_json = json_encode($groupedRights);
+
if ($action == 'deletemenu') {
$formconfirms = $form->formconfirm(
$_SERVER["PHP_SELF"].'?menukey='.urlencode(GETPOST('menukey', 'int')).'&tab='.urlencode($tab).'&module='.urlencode($module),
@@ -4434,12 +4445,15 @@ if ($module == 'initmodule') {
print '';
print '';
print '';
- print '
';
- print '';
print ' | ';
- print '';
- print '';
- print '';
- foreach ($crud as $key => $value) {
- if ($valPerms != $key) {
- print '';
+ print '| ';
+ print '';
+ print '';
+ foreach ($objects as $value) {
+ if ($objPerms != strtolower($value)) {
+ print '';
}
}
+ print '';
+ print '';
+
print '';
print ' | ';
print ' | ';
@@ -4620,6 +4638,43 @@ if ($module == 'initmodule') {
print '';
print '';
+ // display permissions for each object
+ print '';
+
print '';
} else {
diff --git a/htdocs/theme/eldy/global.inc.php b/htdocs/theme/eldy/global.inc.php
index 644e183065f..a71d2697e23 100644
--- a/htdocs/theme/eldy/global.inc.php
+++ b/htdocs/theme/eldy/global.inc.php
@@ -7994,6 +7994,11 @@ table.jPicker {
}
}
+/* for hide a select */
+.hideSelect {
+ display : none;
+}
+
@media only screen and (max-width: 320px)
{
.dropdown dd ul {
@@ -8035,3 +8040,6 @@ if (!empty($conf->global->THEME_CUSTOM_CSS)) {
div.flot-text .flot-tick-label .tickLabel, .fa-color-unset {
color: unset;
}
+
+
+
|