mirror of
https://github.com/pluginsGLPI/example.git
synced 2025-06-28 06:58:43 +02:00
fix add hook + remove static in canView / canCreate
git-svn-id: https://forge.glpi-project.org/svn/example/trunk@121 349b9182-4a13-0410-896f-e5e9767dd1b3
This commit is contained in:
@ -45,14 +45,14 @@ class PluginExampleExample extends CommonDBTM {
|
||||
return 'Example Type';
|
||||
}
|
||||
|
||||
static function canCreate() {
|
||||
function canCreate() {
|
||||
if (isset($_SESSION["glpi_plugin_example_profile"])) {
|
||||
return ($_SESSION["glpi_plugin_example_profile"]['example'] == 'w');
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
static function canView() {
|
||||
function canView() {
|
||||
if (isset($_SESSION["glpi_plugin_example_profile"])) {
|
||||
return ($_SESSION["glpi_plugin_example_profile"]['example'] == 'w'
|
||||
|| $_SESSION["glpi_plugin_example_profile"]['example'] == 'r');
|
||||
|
Reference in New Issue
Block a user