This commit is contained in:
David Bensel
2020-12-14 22:40:47 +03:00
parent 8320546641
commit bc9f7c83f4
3660 changed files with 183847 additions and 274871 deletions

View File

@@ -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);
}
}