mirror of
https://github.com/Dolibarr/dolibarr.git
synced 2026-02-07 16:41:48 +01:00
update
This commit is contained in:
@@ -166,44 +166,44 @@ class modAsset extends DolibarrModules
|
||||
|
||||
// Permissions
|
||||
$this->rights = array(); // Permission array used by this module
|
||||
$this->rights_class = 'asset';
|
||||
$r = 0;
|
||||
$this->rights_class = 'asset';
|
||||
$r = 0;
|
||||
|
||||
$r++;
|
||||
$this->rights[$r][0] = 51001; // Permission id (must not be already used)
|
||||
$r++;
|
||||
$this->rights[$r][0] = 51001; // Permission id (must not be already used)
|
||||
$this->rights[$r][1] = 'Read assets'; // Permission label
|
||||
$this->rights[$r][2] = 'r';
|
||||
$this->rights[$r][3] = 0; // Permission by default for new user (0/1)
|
||||
$this->rights[$r][2] = 'r';
|
||||
$this->rights[$r][3] = 0; // Permission by default for new user (0/1)
|
||||
$this->rights[$r][4] = 'read'; // In php code, permission will be checked by test if ($user->rights->asset->level1->level2)
|
||||
$this->rights[$r][5] = ''; // In php code, permission will be checked by test if ($user->rights->asset->level1->level2)
|
||||
|
||||
$r++;
|
||||
$this->rights[$r][0] = 51002; // Permission id (must not be already used)
|
||||
$this->rights[$r][1] = 'Create/Update assets'; // Permission label
|
||||
$this->rights[$r][2] = 'w';
|
||||
$this->rights[$r][3] = 0; // Permission by default for new user (0/1)
|
||||
$this->rights[$r][2] = 'w';
|
||||
$this->rights[$r][3] = 0; // Permission by default for new user (0/1)
|
||||
$this->rights[$r][4] = 'write'; // In php code, permission will be checked by test if ($user->rights->asset->level1->level2)
|
||||
$this->rights[$r][5] = ''; // In php code, permission will be checked by test if ($user->rights->asset->level1->level2)
|
||||
|
||||
$r++;
|
||||
$this->rights[$r][0] = 51003; // Permission id (must not be already used)
|
||||
$this->rights[$r][1] = 'Delete assets'; // Permission label
|
||||
$this->rights[$r][2] = 'd';
|
||||
$this->rights[$r][3] = 0; // Permission by default for new user (0/1)
|
||||
$this->rights[$r][2] = 'd';
|
||||
$this->rights[$r][3] = 0; // Permission by default for new user (0/1)
|
||||
$this->rights[$r][4] = 'delete'; // In php code, permission will be checked by test if ($user->rights->asset->level1->level2)
|
||||
$this->rights[$r][5] = ''; // In php code, permission will be checked by test if ($user->rights->asset->level1->level2)
|
||||
|
||||
$r++;
|
||||
$this->rights[$r][0] = 51005; // Permission id (must not be already used)
|
||||
$this->rights[$r][1] = 'Setup types of asset'; // Permission label
|
||||
$this->rights[$r][2] = 'w';
|
||||
$this->rights[$r][3] = 0; // Permission by default for new user (0/1)
|
||||
$this->rights[$r][4] = 'setup_advance'; // In php code, permission will be checked by test if ($user->rights->asset->level1->level2)
|
||||
$this->rights[$r][5] = ''; // In php code, permission will be checked by test if ($user->rights->asset->level1->level2)
|
||||
$r++;
|
||||
$this->rights[$r][0] = 51005; // Permission id (must not be already used)
|
||||
$this->rights[$r][1] = 'Setup types of asset'; // Permission label
|
||||
$this->rights[$r][2] = 'w';
|
||||
$this->rights[$r][3] = 0; // Permission by default for new user (0/1)
|
||||
$this->rights[$r][4] = 'setup_advance'; // In php code, permission will be checked by test if ($user->rights->asset->level1->level2)
|
||||
$this->rights[$r][5] = ''; // In php code, permission will be checked by test if ($user->rights->asset->level1->level2)
|
||||
|
||||
// Menus
|
||||
//-------
|
||||
$this->menu = 1; // This module add menu entries. They are coded into menu manager.
|
||||
// Menus
|
||||
//-------
|
||||
$this->menu = 1; // This module add menu entries. They are coded into menu manager.
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -214,13 +214,13 @@ class modAsset extends DolibarrModules
|
||||
* @param string $options Options when enabling module ('', 'noboxes')
|
||||
* @return int 1 if OK, 0 if KO
|
||||
*/
|
||||
public function init($options = '')
|
||||
{
|
||||
// Permissions
|
||||
$this->remove($options);
|
||||
public function init($options = '')
|
||||
{
|
||||
// Permissions
|
||||
$this->remove($options);
|
||||
|
||||
$sql = array();
|
||||
$sql = array();
|
||||
|
||||
return $this->_init($sql, $options);
|
||||
}
|
||||
return $this->_init($sql, $options);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user