You are not logged in.

Announcement

 Téléchargez la dernière version stable de GLPI      -     Et vous, que pouvez vous faire pour le projet GLPI ? :  Contribuer
 Download last stable version of GLPI                      -     What can you do for GLPI ? :  Contribute

#1 2018-05-22 17:52:37

Alejka
Member
Registered: 2018-05-01
Posts: 3

Add plugin rights to Profile::$helpdesk_rights

When profile changed - Profile::cleanProfile() function run.
In this function works next code:

function cleanProfile()

   if ($this->fields["interface"] == "helpdesk") {
      foreach ($this->fields as $key=>$val) {
         if (!in_array($key, self::$common_fields)
             && !in_array($key, self::$helpdesk_rights)) {
            unset($this->fields[$key]);
         }
      }
   }

How I can add my plugin rights to helpdesk users?
I can add in plugin init() method next code:

Profile::$helpdesk_rights[] = PluginSomeClass::$rightname;

Is this correct? Or I can use some glpi API method?

Thanks!

Offline

Board footer

Powered by FluxBB