fix user right on modRessource
This commit is contained in:
parent
04199c2b4b
commit
1feb22ea9c
@ -231,7 +231,7 @@ class modResource extends DolibarrModules
|
||||
'langs'=> 'resource',
|
||||
'position'=> 101,
|
||||
'enabled'=> '1',
|
||||
'perms'=> '$user->rights->resource->read',
|
||||
'perms'=> '$user->rights->resource->write',
|
||||
'target'=> '',
|
||||
'user'=> 0
|
||||
);
|
||||
@ -255,7 +255,7 @@ class modResource extends DolibarrModules
|
||||
// Exports
|
||||
//--------
|
||||
$r=0;
|
||||
|
||||
|
||||
$r++;
|
||||
$this->export_code[$r]=$this->rights_class.'_'.$r;
|
||||
$this->export_label[$r]="ResourceSingular"; // Translation key (used only if key ExportDataset_xxx_z not found)
|
||||
@ -265,19 +265,19 @@ class modResource extends DolibarrModules
|
||||
$this->export_entities_array[$r]=array('r.rowid'=>'resource','r.ref'=>'resource','c.code'=>'resource','c.label'=>'resource','r.description'=>'resource','r.note_private'=>"resource",'r.resource'=>"resource",'r.asset_number'=>'resource','r.datec'=>"resource",'r.tms'=>"resource");
|
||||
$keyforselect='resource'; $keyforelement='resource'; $keyforaliasextra='extra';
|
||||
include DOL_DOCUMENT_ROOT.'/core/extrafieldsinexport.inc.php';
|
||||
|
||||
|
||||
$this->export_dependencies_array[$r]=array('resource'=>array('r.rowid')); // We must keep this until the aggregate_array is used. To add unique key if we ask a field of a child to avoid the DISTINCT to discard them.
|
||||
$this->export_sql_start[$r]='SELECT DISTINCT ';
|
||||
$this->export_sql_end[$r] =' FROM '.MAIN_DB_PREFIX.'resource as r ';
|
||||
$this->export_sql_end[$r] .=' LEFT JOIN '.MAIN_DB_PREFIX.'c_type_resource as c ON c.rowid=r.fk_code_type_resource';
|
||||
$this->export_sql_end[$r] .=' LEFT JOIN '.MAIN_DB_PREFIX.'resource_extrafields as extra ON extra.fk_object = c.rowid';
|
||||
$this->export_sql_end[$r] .=' AND r.entity IN ('.getEntity('resource').')';
|
||||
|
||||
|
||||
|
||||
// Imports
|
||||
//--------
|
||||
$r=0;
|
||||
|
||||
|
||||
// Import list of third parties and attributes
|
||||
$r++;
|
||||
$this->import_code[$r]=$this->rights_class.'_'.$r;
|
||||
@ -307,7 +307,7 @@ class modResource extends DolibarrModules
|
||||
$this->import_regex_array[$r]=array('s.datec'=>'^[0-9][0-9][0-9][0-9]-[0-9][0-9]-[0-9][0-9]( [0-9][0-9]:[0-9][0-9]:[0-9][0-9])?$');
|
||||
$this->import_examplevalues_array[$r]=array('r.ref'=>"REF1",'r.fk_code_type_resource'=>"Code from dictionary resource type",'r.datec'=>"2017-01-01 or 2017-01-01 12:30:00");
|
||||
$this->import_updatekeys_array[$r]=array('r.rf'=>'ResourceFormLabel_ref');
|
||||
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Loading…
Reference in New Issue
Block a user