mirror of
https://github.com/pluginsGLPI/example.git
synced 2025-05-04 18:08:42 +02:00
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:
parent
e2b9e280e7
commit
766d279942
14
setup.php
14
setup.php
@ -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
|
||||
|
Loading…
x
Reference in New Issue
Block a user