Rights on plugins

git-svn-id: https://forge.glpi-project.org/svn/example/trunk@27 349b9182-4a13-0410-896f-e5e9767dd1b3
This commit is contained in:
moyooo 2007-05-19 15:02:23 +00:00
parent e2b9e280e7
commit 766d279942

View File

@ -78,7 +78,6 @@ function plugin_init_example() {
// Params : plugin name - string type - number - tabke - form page
pluginNewType('example',"PLUGIN_EXAMPLE_TYPE",1001,"glpi_plugin_example","example.form.php");
}
@ -93,6 +92,19 @@ function plugin_example_getDatabaseRelations(){
return array("glpi_dropdown_plugin_example"=>array("glpi_plugin_example"=>"FK_dropdown"));
}
// Define rights for the plugin types
function plugin_example_haveTypeRight($type,$right){
switch ($type){
case PLUGIN_EXAMPLE_TYPE :
// 1 - All rights for all users
// return true;
// 2 - Similarity right : same right of computer
return haveRight("computer",$right);
break;
}
}
// Define Dropdown tables to be manage in GLPI :
function plugin_example_getDropdown(){
// Table => Name