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 2015-07-27 06:15:12

damian
Member
Registered: 2015-07-27
Posts: 29

[webservices]: method glpi.setTicketAssign return Command not allowed

When I try to assign a user  to  a ticket the method failed with Command not allowed  error


php testxmlrpc.php --host=127.0.0.1 --url=dsi/sistemas/inventario/plugins/webservices/xmlrpc.php  --session=0koaucvog54g8gjcopgd1hapt6    --method=glpi.setTicketAssign --ticket=4594 --user=6
xmlrpc error(16): Command not allowed

(ticket 4594 and user 6 are valid)


looking in the code, I found the error in the line 1998 of  ./inc/methodhelpdesk.class.php
I comment out : || !self::checkUserRights($params['user'], 'ticket', Ticket::OWN, $entity)
and now is working!

Can you check it out?

         if (!$ticket_user->can(-1, UPDATE, $user)
              // DAMIAN 2015-07-27  con esto no funciona este metodo
             // || !self::checkUserRights($params['user'], 'ticket', Ticket::OWN, $entity)




Thanks!!

Offline

#2 2015-08-14 20:44:16

yllen
GLPI-DEV
From: Sillery (51)
Registered: 2008-01-14
Posts: 15,278

Re: [webservices]: method glpi.setTicketAssign return Command not allowed

You can't assign a ticket to a use if this user is not a technician (can't have right to be in charge of a ticket)


CentOS 6.5 - CentOS 7.x
PHP 5.6 - PHP 7.x - MySQL 5.6  - MariaDB 10.2 + APC + oOPcache
GLPI from 0.72 to dev version
Certifiée ITIL (ITV2F, ITILF, ITILOSA)

Offline

#3 2015-08-28 15:18:52

damian
Member
Registered: 2015-07-27
Posts: 29

Re: [webservices]: method glpi.setTicketAssign return Command not allowed

yllen wrote:

You can't assign a ticket to a use if this user is not a technician (can't have right to be in charge of a ticket)

The User I use to query is Super-Admin .  shoud'nt this user have the right to assign a ticket?

(please excuse my english)

Offline

#4 2015-08-28 15:27:21

LaDenrée
HELPER
Registered: 2012-11-19
Posts: 6,287

Re: [webservices]: method glpi.setTicketAssign return Command not allowed

does your User have several profiles ?
is super admin profile valid on ticket entity for this user ?


Trouver la panne avant de réparer...
GLPI10.0.16 (ubuntu 22.04 PHP8.1  Mariadb10.6 ) plugins : comportements 2.7.3 reports 1.16.0 formcreator 2.13.9, datainjection 2.13.5 fields 1.21.9

Offline

#5 2015-08-28 17:00:57

damian
Member
Registered: 2015-07-27
Posts: 29

Re: [webservices]: method glpi.setTicketAssign return Command not allowed

LaDenrée wrote:

does your User have several profiles ?
is super admin profile valid on ticket entity for this user ?



the user id=6 (name damian) is created in entity root (id=0)  and has 2 profiles:


self-seervice (Dynamic) and super-admin (R: Recursive) for entity root

Offline

#6 2015-08-28 22:04:54

LaDenrée
HELPER
Registered: 2012-11-19
Posts: 6,287

Re: [webservices]: method glpi.setTicketAssign return Command not allowed

have you tried
glpi.setMyProfile method to select "superadmin" profile for this user


Trouver la panne avant de réparer...
GLPI10.0.16 (ubuntu 22.04 PHP8.1  Mariadb10.6 ) plugins : comportements 2.7.3 reports 1.16.0 formcreator 2.13.9, datainjection 2.13.5 fields 1.21.9

Offline

#7 2015-08-28 23:39:00

damian
Member
Registered: 2015-07-27
Posts: 29

Re: [webservices]: method glpi.setTicketAssign return Command not allowed

I Try to set glpi.setMyProfile  with no luck. I continue to receive "Command not allowed "

REQUEST:
<?xml version="1.0" encoding="iso-8859-1"?>
<methodCall>
<methodName>glpi.doLogin</methodName>
<params>
 <param>
  <value>
   <struct>
    <member>
     <name>method</name>
     <value>
      <string>glpi.doLogin</string>
     </value>
    </member>
    <member>
     <name>login_name</name>
     <value>
      <string>webservice_ci</string>
     </value>
    </member>
    <member>
     <name>login_password</name>
     <value>
      <string>XXXXXXXX</string>
     </value>
    </member>
   </struct>
  </value>
 </param>
</params>
</methodCall>

RESPONSE:
<?xml version="1.0" encoding="UTF-8"?>
<methodResponse>
<params>
 <param>
  <value>
   <struct>
    <member>
     <name>id</name>
     <value>
      <string>23631</string>
     </value>
    </member>
    <member>
     <name>name</name>
     <value>
      <string>webservice_ci</string>
     </value>
    </member>
    <member>
     <name>realname</name>
     <value>
      <string/>
     </value>
    </member>
    <member>
     <name>firstname</name>
     <value>
      <string/>
     </value>
    </member>
    <member>
     <name>session</name>
     <value>
      <string>604g03v52v3ldmcaul0vpnpmf3</string>
     </value>
    </member>
   </struct>
  </value>
 </param>
</params>
</methodResponse>


REQUEST:
<?xml version="1.0" encoding="iso-8859-1"?>
<methodCall>
<methodName>glpi.setMyProfile</methodName>
<params>
 <param>
  <value>
   <struct>
    <member>
     <name>method</name>
     <value>
      <string>glpi.setMyProfile</string>
     </value>
    </member>
    <member>
     <name>profile</name>
     <value>
      <int>4</int>
     </value>
    </member>
    <member>
     <name>session</name>
     <value>
      <string>604g03v52v3ldmcaul0vpnpmf3</string>
     </value>
    </member>
   </struct>
  </value>
 </param>
</params>
</methodCall>

RESPONSE:
<?xml version="1.0" encoding="UTF-8"?>
<methodResponse>
<params>
 <param>
  <value>
   <struct>
    <member>
     <name>id</name>
     <value>
      <string>4</string>
     </value>
    </member>
    <member>
     <name>name</name>
     <value>
      <string>Super-Admin</string>
     </value>
    </member>
   </struct>
  </value>
 </param>
</params>
</methodResponse>


REQUEST:
<?xml version="1.0" encoding="iso-8859-1"?>
<methodCall>
<methodName>glpi.setTicketAssign</methodName>
<params>
 <param>
  <value>
   <struct>
    <member>
     <name>method</name>
     <value>
      <string>glpi.setTicketAssign</string>
     </value>
    </member>
    <member>
     <name>user</name>
     <value>
      <int>6</int>
     </value>
    </member>
    <member>
     <name>ticket</name>
     <value>
      <int>4591</int>
     </value>
    </member>
    <member>
     <name>session</name>
     <value>
      <string>604g03v52v3ldmcaul0vpnpmf3</string>
     </value>
    </member>
   </struct>
  </value>
 </param>
</params>
</methodCall>

RESPONSE:
<?xml version="1.0" encoding="UTF-8"?>
<methodResponse>
<fault>
 <value>
  <struct>
   <member>
    <name>faultCode</name>
    <value>
     <int>16</int>
    </value>
   </member>
   <member>
    <name>faultString</name>
    <value>
     <string>Command not allowed</string>
    </value>
   </member>
  </struct>
 </value>
</fault>
</methodResponse>

Offline

#8 2015-08-29 00:15:21

LaDenrée
HELPER
Registered: 2012-11-19
Posts: 6,287

Re: [webservices]: method glpi.setTicketAssign return Command not allowed

HI,
you log in with user webservice_ci (id=23631)

is ticket 4594  in root ?

has  user webservice_ci (id=23631) a super-admin recursive profile on root ?

can this webservice user assign this ticket without using webservice ( you log in and use helpdesk interface)?


Trouver la panne avant de réparer...
GLPI10.0.16 (ubuntu 22.04 PHP8.1  Mariadb10.6 ) plugins : comportements 2.7.3 reports 1.16.0 formcreator 2.13.9, datainjection 2.13.5 fields 1.21.9

Offline

#9 2015-08-29 03:32:24

damian
Member
Registered: 2015-07-27
Posts: 29

Re: [webservices]: method glpi.setTicketAssign return Command not allowed

Yes webservice_ci is super-admin and if I use webservice_ci via the helpdesk interface I can assign the ticket without any problems. I have the problem if I do the action via the webservice interface




Here is the webservice dialog (i add an listMyProfiles call to check

REQUEST:
<?xml version="1.0" encoding="iso-8859-1"?>
<methodCall>
<methodName>glpi.doLogin</methodName>
<params>
 <param>
  <value>
   <struct>
    <member>
     <name>method</name>
     <value>
      <string>glpi.doLogin</string>
     </value>
    </member>
    <member>
     <name>login_name</name>
     <value>
      <string>webservice_ci</string>
     </value>
    </member>
    <member>
     <name>login_password</name>
     <value>
      <string>XXXXXXX</string>
     </value>
    </member>
   </struct>
  </value>
 </param>
</params>
</methodCall>

RESPONSE:
<?xml version="1.0" encoding="UTF-8"?>
<methodResponse>
<params>
 <param>
  <value>
   <struct>
    <member>
     <name>id</name>
     <value>
      <string>23631</string>
     </value>
    </member>
    <member>
     <name>name</name>
     <value>
      <string>webservice_ci</string>
     </value>
    </member>
    <member>
     <name>realname</name>
     <value>
      <string/>
     </value>
    </member>
    <member>
     <name>firstname</name>
     <value>
      <string/>
     </value>
    </member>
    <member>
     <name>session</name>
     <value>
      <string>ms92hu3p9clcfprvstu3md7ov3</string>
     </value>
    </member>
   </struct>
  </value>
 </param>
</params>
</methodResponse>


REQUEST:
<?xml version="1.0" encoding="iso-8859-1"?>
<methodCall>
<methodName>glpi.setMyProfile</methodName>
<params>
 <param>
  <value>
   <struct>
    <member>
     <name>method</name>
     <value>
      <string>glpi.setMyProfile</string>
     </value>
    </member>
    <member>
     <name>profile</name>
     <value>
      <int>4</int>
     </value>
    </member>
    <member>
     <name>session</name>
     <value>
      <string>ms92hu3p9clcfprvstu3md7ov3</string>
     </value>
    </member>
   </struct>
  </value>
 </param>
</params>
</methodCall>

RESPONSE:
<?xml version="1.0" encoding="UTF-8"?>
<methodResponse>
<params>
 <param>
  <value>
   <struct>
    <member>
     <name>id</name>
     <value>
      <string>4</string>
     </value>
    </member>
    <member>
     <name>name</name>
     <value>
      <string>Super-Admin</string>
     </value>
    </member>
   </struct>
  </value>
 </param>
</params>
</methodResponse>


REQUEST:
<?xml version="1.0" encoding="iso-8859-1"?>
<methodCall>
<methodName>glpi.listMyProfiles</methodName>
<params>
 <param>
  <value>
   <struct>
    <member>
     <name>method</name>
     <value>
      <string>glpi.listMyProfiles</string>
     </value>
    </member>
    <member>
     <name>session</name>
     <value>
      <string>ms92hu3p9clcfprvstu3md7ov3</string>
     </value>
    </member>
   </struct>
  </value>
 </param>
</params>
</methodCall>

RESPONSE:
<?xml version="1.0" encoding="UTF-8"?>
<methodResponse>
<params>
 <param>
  <value>
   <array>
    <data>
     <value>
      <struct>
       <member>
        <name>id</name>
        <value>
         <int>4</int>
        </value>
       </member>
       <member>
        <name>name</name>
        <value>
         <string>Super-Admin</string>
        </value>
       </member>
       <member>
        <name>current</name>
        <value>
         <int>1</int>
        </value>
       </member>
      </struct>
     </value>
     <value>
      <struct>
       <member>
        <name>id</name>
        <value>
         <int>6</int>
        </value>
       </member>
       <member>
        <name>name</name>
        <value>
         <string>Technician</string>
        </value>
       </member>
       <member>
        <name>current</name>
        <value>
         <int>0</int>
        </value>
       </member>
      </struct>
     </value>
    </data>
   </array>
  </value>
 </param>
</params>
</methodResponse>


REQUEST:
<?xml version="1.0" encoding="iso-8859-1"?>
<methodCall>
<methodName>glpi.setTicketAssign</methodName>
<params>
 <param>
  <value>
   <struct>
    <member>
     <name>method</name>
     <value>
      <string>glpi.setTicketAssign</string>
     </value>
    </member>
    <member>
     <name>user</name>
     <value>
      <int>6</int>
     </value>
    </member>
    <member>
     <name>ticket</name>
     <value>
      <int>4594</int>
     </value>
    </member>
    <member>
     <name>session</name>
     <value>
      <string>ms92hu3p9clcfprvstu3md7ov3</string>
     </value>
    </member>
   </struct>
  </value>
 </param>
</params>
</methodCall>

RESPONSE:
<?xml version="1.0" encoding="UTF-8"?>
<methodResponse>
<fault>
 <value>
  <struct>
   <member>
    <name>faultCode</name>
    <value>
     <int>16</int>
    </value>
   </member>
   <member>
    <name>faultString</name>
    <value>
     <string>Command not allowed</string>
    </value>
   </member>
  </struct>
 </value>
</fault>
</methodResponse>

Offline

#10 2015-08-29 03:51:43

damian
Member
Registered: 2015-07-27
Posts: 29

Re: [webservices]: method glpi.setTicketAssign return Command not allowed

I use GLPI 0.85.4 and webservices 1.5.0

Offline

#11 2015-08-30 09:16:43

yllen
GLPI-DEV
From: Sillery (51)
Registered: 2008-01-14
Posts: 15,278

Re: [webservices]: method glpi.setTicketAssign return Command not allowed

damian wrote:
yllen wrote:

You can't assign a ticket to a use if this user is not a technician (can't have right to be in charge of a ticket)

The User I use to query is Super-Admin .  shoud'nt this user have the right to assign a ticket?

(please excuse my english)

Your user must have right to own ticket.
In your examples, user = 6 . Has this user right?

Do not confuse the ticket editor and technician assign to the ticket (--user=xx is the technician assign)


CentOS 6.5 - CentOS 7.x
PHP 5.6 - PHP 7.x - MySQL 5.6  - MariaDB 10.2 + APC + oOPcache
GLPI from 0.72 to dev version
Certifiée ITIL (ITV2F, ITILF, ITILOSA)

Offline

#12 2015-08-30 14:39:55

damian
Member
Registered: 2015-07-27
Posts: 29

Re: [webservices]: method glpi.setTicketAssign return Command not allowed

The user damian (id=6) has the same rights than webservice_ci.

I execute the query with user=damian with the same results

REQUEST:
<?xml version="1.0" encoding="iso-8859-1"?>
<methodCall>
<methodName>glpi.doLogin</methodName>
<params>
 <param>
  <value>
   <struct>
    <member>
     <name>method</name>
     <value>
      <string>glpi.doLogin</string>
     </value>
    </member>
    <member>
     <name>login_name</name>
     <value>
      <string>damian</string>
     </value>
    </member>
    <member>
     <name>login_password</name>
     <value>
      <string>XXXXXX</string>
     </value>
    </member>
   </struct>
  </value>
 </param>
</params>
</methodCall>

RESPONSE:
<?xml version="1.0" encoding="UTF-8"?>
<methodResponse>
<params>
 <param>
  <value>
   <struct>
    <member>
     <name>id</name>
     <value>
      <string>6</string>
     </value>
    </member>
    <member>
     <name>name</name>
     <value>
      <string>damian</string>
     </value>
    </member>
    <member>
     <name>realname</name>
     <value>
      <string>Fernandez Sosa (DSI)</string>
     </value>
    </member>
    <member>
     <name>firstname</name>
     <value>
      <string>Damian Alejandro</string>
     </value>
    </member>
    <member>
     <name>session</name>
     <value>
      <string>afp4426l1ndms9q3u7enecjui5</string>
     </value>
    </member>
   </struct>
  </value>
 </param>
</params>
</methodResponse>


REQUEST:
<?xml version="1.0" encoding="iso-8859-1"?>
<methodCall>
<methodName>glpi.setMyProfile</methodName>
<params>
 <param>
  <value>
   <struct>
    <member>
     <name>method</name>
     <value>
      <string>glpi.setMyProfile</string>
     </value>
    </member>
    <member>
     <name>profile</name>
     <value>
      <int>4</int>
     </value>
    </member>
    <member>
     <name>session</name>
     <value>
      <string>afp4426l1ndms9q3u7enecjui5</string>
     </value>
    </member>
   </struct>
  </value>
 </param>
</params>
</methodCall>

RESPONSE:
<?xml version="1.0" encoding="UTF-8"?>
<methodResponse>
<params>
 <param>
  <value>
   <struct>
    <member>
     <name>id</name>
     <value>
      <string>4</string>
     </value>
    </member>
    <member>
     <name>name</name>
     <value>
      <string>Super-Admin</string>
     </value>
    </member>
   </struct>
  </value>
 </param>
</params>
</methodResponse>


REQUEST:
<?xml version="1.0" encoding="iso-8859-1"?>
<methodCall>
<methodName>glpi.listMyProfiles</methodName>
<params>
 <param>
  <value>
   <struct>
    <member>
     <name>method</name>
     <value>
      <string>glpi.listMyProfiles</string>
     </value>
    </member>
    <member>
     <name>session</name>
     <value>
      <string>afp4426l1ndms9q3u7enecjui5</string>
     </value>
    </member>
   </struct>
  </value>
 </param>
</params>
</methodCall>

RESPONSE:
<?xml version="1.0" encoding="UTF-8"?>
<methodResponse>
<params>
 <param>
  <value>
   <array>
    <data>
     <value>
      <struct>
       <member>
        <name>id</name>
        <value>
         <int>1</int>
        </value>
       </member>
       <member>
        <name>name</name>
        <value>
         <string>Self-Service</string>
        </value>
       </member>
       <member>
        <name>current</name>
        <value>
         <int>0</int>
        </value>
       </member>
      </struct>
     </value>
     <value>
      <struct>
       <member>
        <name>id</name>
        <value>
         <int>4</int>
        </value>
       </member>
       <member>
        <name>name</name>
        <value>
         <string>Super-Admin</string>
        </value>
       </member>
       <member>
        <name>current</name>
        <value>
         <int>1</int>
        </value>
       </member>
      </struct>
     </value>
     <value>
      <struct>
       <member>
        <name>id</name>
        <value>
         <int>6</int>
        </value>
       </member>
       <member>
        <name>name</name>
        <value>
         <string>Technician</string>
        </value>
       </member>
       <member>
        <name>current</name>
        <value>
         <int>0</int>
        </value>
       </member>
      </struct>
     </value>
    </data>
   </array>
  </value>
 </param>
</params>
</methodResponse>


REQUEST:
<?xml version="1.0" encoding="iso-8859-1"?>
<methodCall>
<methodName>glpi.setTicketAssign</methodName>
<params>
 <param>
  <value>
   <struct>
    <member>
     <name>method</name>
     <value>
      <string>glpi.setTicketAssign</string>
     </value>
    </member>
    <member>
     <name>user</name>
     <value>
      <int>6</int>
     </value>
    </member>
    <member>
     <name>ticket</name>
     <value>
      <int>4594</int>
     </value>
    </member>
    <member>
     <name>session</name>
     <value>
      <string>afp4426l1ndms9q3u7enecjui5</string>
     </value>
    </member>
   </struct>
  </value>
 </param>
</params>
</methodCall>

RESPONSE:
<?xml version="1.0" encoding="UTF-8"?>
<methodResponse>
<fault>
 <value>
  <struct>
   <member>
    <name>faultCode</name>
    <value>
     <int>16</int>
    </value>
   </member>
   <member>
    <name>faultString</name>
    <value>
     <string>Command not allowed</string>
    </value>
   </member>
  </struct>
 </value>
</fault>
</methodResponse>

Offline

#13 2015-08-31 11:24:41

LaDenrée
HELPER
Registered: 2012-11-19
Posts: 6,287

Re: [webservices]: method glpi.setTicketAssign return Command not allowed

is ticket 4594  in root ?

there are 3 params in "checkUserRights($params['user'], 'ticket', Ticket::OWN, $entity)";

have you also checked  glpi.listMyEntities and glpi.setMyEntity ?


Trouver la panne avant de réparer...
GLPI10.0.16 (ubuntu 22.04 PHP8.1  Mariadb10.6 ) plugins : comportements 2.7.3 reports 1.16.0 formcreator 2.13.9, datainjection 2.13.5 fields 1.21.9

Offline

#14 2015-08-31 15:14:03

damian
Member
Registered: 2015-07-27
Posts: 29

Re: [webservices]: method glpi.setTicketAssign return Command not allowed

No success sad

The ticket is created on entity ConectarIgualdad and the user damian is superadmin and tecnitian on root entity (recursive)

REQUEST:
<?xml version="1.0" encoding="iso-8859-1"?>
<methodCall>
<methodName>glpi.doLogin</methodName>
<params>
 <param>
  <value>
   <struct>
    <member>
     <name>method</name>
     <value>
      <string>glpi.doLogin</string>
     </value>
    </member>
    <member>
     <name>login_name</name>
     <value>
      <string>damian</string>
     </value>
    </member>
    <member>
     <name>login_password</name>
     <value>
      <string>XXXX</string>
     </value>
    </member>
   </struct>
  </value>
 </param>
</params>
</methodCall>

RESPONSE:
<?xml version="1.0" encoding="UTF-8"?>
<methodResponse>
<params>
 <param>
  <value>
   <struct>
    <member>
     <name>id</name>
     <value>
      <string>6</string>
     </value>
    </member>
    <member>
     <name>name</name>
     <value>
      <string>damian</string>
     </value>
    </member>
    <member>
     <name>realname</name>
     <value>
      <string>Fernandez Sosa (DSI)</string>
     </value>
    </member>
    <member>
     <name>firstname</name>
     <value>
      <string>Damian Alejandro</string>
     </value>
    </member>
    <member>
     <name>session</name>
     <value>
      <string>2c63l0o2rr2voj05vq6o1v5du1</string>
     </value>
    </member>
   </struct>
  </value>
 </param>
</params>
</methodResponse>

REQUEST:
<?xml version="1.0" encoding="iso-8859-1"?>
<methodCall>
<methodName>glpi.setMyProfile</methodName>
<params>
 <param>
  <value>
   <struct>
    <member>
     <name>method</name>
     <value>
      <string>glpi.setMyProfile</string>
     </value>
    </member>
    <member>
     <name>profile</name>
     <value>
      <int>4</int>
     </value>
    </member>
    <member>
     <name>session</name>
     <value>
      <string>2c63l0o2rr2voj05vq6o1v5du1</string>
     </value>
    </member>
   </struct>
  </value>
 </param>
</params>
</methodCall>

RESPONSE:
<?xml version="1.0" encoding="UTF-8"?>
<methodResponse>
<params>
 <param>
  <value>
   <struct>
    <member>
     <name>id</name>
     <value>
      <string>4</string>
     </value>
    </member>
    <member>
     <name>name</name>
     <value>
      <string>Super-Admin</string>
     </value>
    </member>
   </struct>
  </value>
 </param>
</params>
</methodResponse>

REQUEST:
<?xml version="1.0" encoding="iso-8859-1"?>
<methodCall>
<methodName>glpi.listMyProfiles</methodName>
<params>
 <param>
  <value>
   <struct>
    <member>
     <name>method</name>
     <value>
      <string>glpi.listMyProfiles</string>
     </value>
    </member>
    <member>
     <name>session</name>
     <value>
      <string>2c63l0o2rr2voj05vq6o1v5du1</string>
     </value>
    </member>
   </struct>
  </value>
 </param>
</params>
</methodCall>

RESPONSE:
<?xml version="1.0" encoding="UTF-8"?>
<methodResponse>
<params>
 <param>
  <value>
   <array>
    <data>
     <value>
      <struct>
       <member>
        <name>id</name>
        <value>
         <int>1</int>
        </value>
       </member>
       <member>
        <name>name</name>
        <value>
         <string>Self-Service</string>
        </value>
       </member>
       <member>
        <name>current</name>
        <value>
         <int>0</int>
        </value>
       </member>
      </struct>
     </value>
     <value>
      <struct>
       <member>
        <name>id</name>
        <value>
         <int>4</int>
        </value>
       </member>
       <member>
        <name>name</name>
        <value>
         <string>Super-Admin</string>
        </value>
       </member>
       <member>
        <name>current</name>
        <value>
         <int>1</int>
        </value>
       </member>
      </struct>
     </value>
     <value>
      <struct>
       <member>
        <name>id</name>
        <value>
         <int>6</int>
        </value>
       </member>
       <member>
        <name>name</name>
        <value>
         <string>Technician</string>
        </value>
       </member>
       <member>
        <name>current</name>
        <value>
         <int>0</int>
        </value>
       </member>
      </struct>
     </value>
    </data>
   </array>
  </value>
 </param>
</params>
</methodResponse>

REQUEST:
<?xml version="1.0" encoding="iso-8859-1"?>
<methodCall>
<methodName>glpi.listMyEntities</methodName>
<params>
 <param>
  <value>
   <struct>
    <member>
     <name>method</name>
     <value>
      <string>glpi.listMyEntities</string>
     </value>
    </member>
    <member>
     <name>session</name>
     <value>
      <string>2c63l0o2rr2voj05vq6o1v5du1</string>
     </value>
    </member>
   </struct>
  </value>
 </param>
</params>
</methodCall>

RESPONSE:
<?xml version="1.0" encoding="UTF-8"?>
<methodResponse>
<params>
 <param>
  <value>
   <array>
    <data>
     <value>
      <struct>
       <member>
        <name>id</name>
        <value>
         <string>0</string>
        </value>
       </member>
       <member>
        <name>name</name>
        <value>
         <string>Root entity</string>
        </value>
       </member>
       <member>
        <name>entities_id</name>
        <value>
         <string>-1</string>
        </value>
       </member>
       <member>
        <name>completename</name>
        <value>
         <string>Root entity</string>
        </value>
       </member>
       <member>
        <name>comment</name>
        <value>
         <string/>
        </value>
       </member>
       <member>
        <name>level</name>
        <value>
         <string>1</string>
        </value>
       </member>
       <member>
        <name>is_recursive</name>
        <value>
         <string>1</string>
        </value>
       </member>
       <member>
        <name>current</name>
        <value>
         <int>1</int>
        </value>
       </member>
      </struct>
     </value>
     <value>
      <struct>
       <member>
        <name>id</name>
        <value>
         <string>1</string>
        </value>
       </member>
       <member>
        <name>name</name>
        <value>
         <string>ConectarIgualdad</string>
        </value>
       </member>
       <member>
        <name>entities_id</name>
        <value>
         <string>0</string>
        </value>
       </member>
       <member>
        <name>completename</name>
        <value>
         <string>Root entity &#62; ConectarIgualdad</string>
        </value>
       </member>
       <member>
        <name>comment</name>
        <value>
         <string>Incidencias sobre ConectarIgualdad</string>
        </value>
       </member>
       <member>
        <name>level</name>
        <value>
         <string>2</string>
        </value>
       </member>
       <member>
        <name>is_recursive</name>
        <value>
         <string>1</string>
        </value>
       </member>
       <member>
        <name>current</name>
        <value>
         <int>1</int>
        </value>
       </member>
      </struct>
     </value>
     <value>
      <struct>
       <member>
        <name>id</name>
        <value>
         <string>2</string>
        </value>
       </member>
       <member>
        <name>name</name>
        <value>
         <string>CNBA</string>
        </value>
       </member>
       <member>
        <name>entities_id</name>
        <value>
         <string>0</string>
        </value>
       </member>
       <member>
        <name>completename</name>
        <value>
         <string>Root entity &#62; CNBA</string>
        </value>
       </member>
       <member>
        <name>comment</name>
        <value>
         <string>Todo el Colegio</string>
        </value>
       </member>
       <member>
        <name>level</name>
        <value>
         <string>2</string>
        </value>
       </member>
       <member>
        <name>is_recursive</name>
        <value>
         <string>1</string>
        </value>
       </member>
       <member>
        <name>current</name>
        <value>
         <int>1</int>
        </value>
       </member>
      </struct>
     </value>
     <value>
      <struct>
       <member>
        <name>id</name>
        <value>
         <string>3</string>
        </value>
       </member>
       <member>
        <name>name</name>
        <value>
         <string>En Deposito</string>
        </value>
       </member>
       <member>
        <name>entities_id</name>
        <value>
         <string>2</string>
        </value>
       </member>
       <member>
        <name>completename</name>
        <value>
         <string>Root entity &#62; CNBA &#62; En Deposito</string>
        </value>
       </member>
       <member>
        <name>comment</name>
        <value>
         <string/>
        </value>
       </member>
       <member>
        <name>level</name>
        <value>
         <string>3</string>
        </value>
       </member>
       <member>
        <name>is_recursive</name>
        <value>
         <string>1</string>
        </value>
       </member>
       <member>
        <name>current</name>
        <value>
         <int>1</int>
        </value>
       </member>
      </struct>
     </value>
     <value>
      <struct>
       <member>
        <name>id</name>
        <value>
         <string>4</string>
        </value>
       </member>
       <member>
        <name>name</name>
        <value>
         <string>EXTERNOS</string>
        </value>
       </member>
       <member>
        <name>entities_id</name>
        <value>
         <string>0</string>
        </value>
       </member>
       <member>
        <name>completename</name>
        <value>
         <string>Root entity &#62; EXTERNOS</string>
        </value>
       </member>
       <member>
        <name>comment</name>
        <value>
         <string/>
        </value>
       </member>
       <member>
        <name>level</name>
        <value>
         <string>2</string>
        </value>
       </member>
       <member>
        <name>is_recursive</name>
        <value>
         <string>1</string>
        </value>
       </member>
       <member>
        <name>current</name>
        <value>
         <int>1</int>
        </value>
       </member>
      </struct>
     </value>
     <value>
      <struct>
       <member>
        <name>id</name>
        <value>
         <string>5</string>
        </value>
       </member>
       <member>
        <name>name</name>
        <value>
         <string>Dada de Baja</string>
        </value>
       </member>
       <member>
        <name>entities_id</name>
        <value>
         <string>2</string>
        </value>
       </member>
       <member>
        <name>completename</name>
        <value>
         <string>Root entity &#62; CNBA &#62; Dada de Baja</string>
        </value>
       </member>
       <member>
        <name>comment</name>
        <value>
         <string/>
        </value>
       </member>
       <member>
        <name>level</name>
        <value>
         <string>3</string>
        </value>
       </member>
       <member>
        <name>is_recursive</name>
        <value>
         <string>1</string>
        </value>
       </member>
       <member>
        <name>current</name>
        <value>
         <int>1</int>
        </value>
       </member>
      </struct>
     </value>
    </data>
   </array>
  </value>
 </param>
</params>
</methodResponse>

REQUEST:
<?xml version="1.0" encoding="iso-8859-1"?>
<methodCall>
<methodName>glpi.setMyEntity</methodName>
<params>
 <param>
  <value>
   <struct>
    <member>
     <name>method</name>
     <value>
      <string>glpi.setMyEntity</string>
     </value>
    </member>
    <member>
     <name>entity</name>
     <value>
      <int>1</int>
     </value>
    </member>
    <member>
     <name>recursive</name>
     <value>
      <int>1</int>
     </value>
    </member>
    <member>
     <name>session</name>
     <value>
      <string>2c63l0o2rr2voj05vq6o1v5du1</string>
     </value>
    </member>
   </struct>
  </value>
 </param>
</params>
</methodCall>

RESPONSE:
<?xml version="1.0" encoding="UTF-8"?>
<methodResponse>
<params>
 <param>
  <value>
   <array>
    <data>
     <value>
      <struct>
       <member>
        <name>id</name>
        <value>
         <string>1</string>
        </value>
       </member>
       <member>
        <name>completename</name>
        <value>
         <string>Root entity &#62; ConectarIgualdad</string>
        </value>
       </member>
      </struct>
     </value>
    </data>
   </array>
  </value>
 </param>
</params>
</methodResponse>

REQUEST:
<?xml version="1.0" encoding="iso-8859-1"?>
<methodCall>
<methodName>glpi.setTicketAssign</methodName>
<params>
 <param>
  <value>
   <struct>
    <member>
     <name>method</name>
     <value>
      <string>glpi.setTicketAssign</string>
     </value>
    </member>
    <member>
     <name>user</name>
     <value>
      <int>6</int>
     </value>
    </member>
    <member>
     <name>ticket</name>
     <value>
      <int>4594</int>
     </value>
    </member>
    <member>
     <name>session</name>
     <value>
      <string>2c63l0o2rr2voj05vq6o1v5du1</string>
     </value>
    </member>
   </struct>
  </value>
 </param>
</params>
</methodCall>

RESPONSE:
<?xml version="1.0" encoding="UTF-8"?>
<methodResponse>
<fault>
 <value>
  <struct>
   <member>
    <name>faultCode</name>
    <value>
     <int>16</int>
    </value>
   </member>
   <member>
    <name>faultString</name>
    <value>
     <string>Command not allowed</string>
    </value>
   </member>
  </struct>
 </value>
</fault>
</methodResponse>

Offline

#15 2015-08-31 16:08:41

LaDenrée
HELPER
Registered: 2012-11-19
Posts: 6,287

Re: [webservices]: method glpi.setTicketAssign return Command not allowed

not sure but :

in your requests "user id" is an <int> type
in answers user id is an <string> type

error message is "faultString".

also for ticket #...


Trouver la panne avant de réparer...
GLPI10.0.16 (ubuntu 22.04 PHP8.1  Mariadb10.6 ) plugins : comportements 2.7.3 reports 1.16.0 formcreator 2.13.9, datainjection 2.13.5 fields 1.21.9

Offline

#16 2015-08-31 20:41:46

damian
Member
Registered: 2015-07-27
Posts: 29

Re: [webservices]: method glpi.setTicketAssign return Command not allowed

I tryed to add (int) to the user and the ticket# but that don't solve the issue sad


LaDenrée wrote:

not sure but :

in your requests "user id" is an <int> type
in answers user id is an <string> type

error message is "faultString".

also for ticket #...

Offline

#17 2015-09-01 08:08:21

LaDenrée
HELPER
Registered: 2012-11-19
Posts: 6,287

Re: [webservices]: method glpi.setTicketAssign return Command not allowed

instead of
user=6
try
user="6"


Trouver la panne avant de réparer...
GLPI10.0.16 (ubuntu 22.04 PHP8.1  Mariadb10.6 ) plugins : comportements 2.7.3 reports 1.16.0 formcreator 2.13.9, datainjection 2.13.5 fields 1.21.9

Offline

#18 2015-09-01 12:27:57

damian
Member
Registered: 2015-07-27
Posts: 29

Re: [webservices]: method glpi.setTicketAssign return Command not allowed

I use "6" for the user and "4594" for the ticket , but it does not work sad

REQUEST:
<?xml version="1.0" encoding="iso-8859-1"?>
<methodCall>
<methodName>glpi.doLogin</methodName>
<params>
 <param>
  <value>
   <struct>
    <member>
     <name>method</name>
     <value>
      <string>glpi.doLogin</string>
     </value>
    </member>
    <member>
     <name>login_name</name>
     <value>
      <string>damian</string>
     </value>
    </member>
    <member>
     <name>login_password</name>
     <value>
      <string>XXXXXXXXX</string>
     </value>
    </member>
   </struct>
  </value>
 </param>
</params>
</methodCall>

RESPONSE:
<?xml version="1.0" encoding="UTF-8"?>
<methodResponse>
<params>
 <param>
  <value>
   <struct>
    <member>
     <name>id</name>
     <value>
      <string>6</string>
     </value>
    </member>
    <member>
     <name>name</name>
     <value>
      <string>damian</string>
     </value>
    </member>
    <member>
     <name>realname</name>
     <value>
      <string>Fernandez Sosa (DSI)</string>
     </value>
    </member>
    <member>
     <name>firstname</name>
     <value>
      <string>Damian Alejandro</string>
     </value>
    </member>
    <member>
     <name>session</name>
     <value>
      <string>2apn531qt2jhfc430ar470bjl7</string>
     </value>
    </member>
   </struct>
  </value>
 </param>
</params>
</methodResponse>

REQUEST:
<?xml version="1.0" encoding="iso-8859-1"?>
<methodCall>
<methodName>glpi.setMyProfile</methodName>
<params>
 <param>
  <value>
   <struct>
    <member>
     <name>method</name>
     <value>
      <string>glpi.setMyProfile</string>
     </value>
    </member>
    <member>
     <name>profile</name>
     <value>
      <int>4</int>
     </value>
    </member>
    <member>
     <name>session</name>
     <value>
      <string>2apn531qt2jhfc430ar470bjl7</string>
     </value>
    </member>
   </struct>
  </value>
 </param>
</params>
</methodCall>

RESPONSE:
<?xml version="1.0" encoding="UTF-8"?>
<methodResponse>
<params>
 <param>
  <value>
   <struct>
    <member>
     <name>id</name>
     <value>
      <string>4</string>
     </value>
    </member>
    <member>
     <name>name</name>
     <value>
      <string>Super-Admin</string>
     </value>
    </member>
   </struct>
  </value>
 </param>
</params>
</methodResponse>

REQUEST:
<?xml version="1.0" encoding="iso-8859-1"?>
<methodCall>
<methodName>glpi.listMyProfiles</methodName>
<params>
 <param>
  <value>
   <struct>
    <member>
     <name>method</name>
     <value>
      <string>glpi.listMyProfiles</string>
     </value>
    </member>
    <member>
     <name>session</name>
     <value>
      <string>2apn531qt2jhfc430ar470bjl7</string>
     </value>
    </member>
   </struct>
  </value>
 </param>
</params>
</methodCall>

RESPONSE:
<?xml version="1.0" encoding="UTF-8"?>
<methodResponse>
<params>
 <param>
  <value>
   <array>
    <data>
     <value>
      <struct>
       <member>
        <name>id</name>
        <value>
         <int>1</int>
        </value>
       </member>
       <member>
        <name>name</name>
        <value>
         <string>Self-Service</string>
        </value>
       </member>
       <member>
        <name>current</name>
        <value>
         <int>0</int>
        </value>
       </member>
      </struct>
     </value>
     <value>
      <struct>
       <member>
        <name>id</name>
        <value>
         <int>4</int>
        </value>
       </member>
       <member>
        <name>name</name>
        <value>
         <string>Super-Admin</string>
        </value>
       </member>
       <member>
        <name>current</name>
        <value>
         <int>1</int>
        </value>
       </member>
      </struct>
     </value>
     <value>
      <struct>
       <member>
        <name>id</name>
        <value>
         <int>6</int>
        </value>
       </member>
       <member>
        <name>name</name>
        <value>
         <string>Technician</string>
        </value>
       </member>
       <member>
        <name>current</name>
        <value>
         <int>0</int>
        </value>
       </member>
      </struct>
     </value>
    </data>
   </array>
  </value>
 </param>
</params>
</methodResponse>

REQUEST:
<?xml version="1.0" encoding="iso-8859-1"?>
<methodCall>
<methodName>glpi.listMyEntities</methodName>
<params>
 <param>
  <value>
   <struct>
    <member>
     <name>method</name>
     <value>
      <string>glpi.listMyEntities</string>
     </value>
    </member>
    <member>
     <name>session</name>
     <value>
      <string>2apn531qt2jhfc430ar470bjl7</string>
     </value>
    </member>
   </struct>
  </value>
 </param>
</params>
</methodCall>

RESPONSE:
<?xml version="1.0" encoding="UTF-8"?>
<methodResponse>
<params>
 <param>
  <value>
   <array>
    <data>
     <value>
      <struct>
       <member>
        <name>id</name>
        <value>
         <string>0</string>
        </value>
       </member>
       <member>
        <name>name</name>
        <value>
         <string>Root entity</string>
        </value>
       </member>
       <member>
        <name>entities_id</name>
        <value>
         <string>-1</string>
        </value>
       </member>
       <member>
        <name>completename</name>
        <value>
         <string>Root entity</string>
        </value>
       </member>
       <member>
        <name>comment</name>
        <value>
         <string/>
        </value>
       </member>
       <member>
        <name>level</name>
        <value>
         <string>1</string>
        </value>
       </member>
       <member>
        <name>is_recursive</name>
        <value>
         <string>1</string>
        </value>
       </member>
       <member>
        <name>current</name>
        <value>
         <int>1</int>
        </value>
       </member>
      </struct>
     </value>
     <value>
      <struct>
       <member>
        <name>id</name>
        <value>
         <string>1</string>
        </value>
       </member>
       <member>
        <name>name</name>
        <value>
         <string>ConectarIgualdad</string>
        </value>
       </member>
       <member>
        <name>entities_id</name>
        <value>
         <string>0</string>
        </value>
       </member>
       <member>
        <name>completename</name>
        <value>
         <string>Root entity &#62; ConectarIgualdad</string>
        </value>
       </member>
       <member>
        <name>comment</name>
        <value>
         <string>Incidencias sobre ConectarIgualdad</string>
        </value>
       </member>
       <member>
        <name>level</name>
        <value>
         <string>2</string>
        </value>
       </member>
       <member>
        <name>is_recursive</name>
        <value>
         <string>1</string>
        </value>
       </member>
       <member>
        <name>current</name>
        <value>
         <int>1</int>
        </value>
       </member>
      </struct>
     </value>
     <value>
      <struct>
       <member>
        <name>id</name>
        <value>
         <string>2</string>
        </value>
       </member>
       <member>
        <name>name</name>
        <value>
         <string>CNBA</string>
        </value>
       </member>
       <member>
        <name>entities_id</name>
        <value>
         <string>0</string>
        </value>
       </member>
       <member>
        <name>completename</name>
        <value>
         <string>Root entity &#62; CNBA</string>
        </value>
       </member>
       <member>
        <name>comment</name>
        <value>
         <string>Todo el Colegio</string>
        </value>
       </member>
       <member>
        <name>level</name>
        <value>
         <string>2</string>
        </value>
       </member>
       <member>
        <name>is_recursive</name>
        <value>
         <string>1</string>
        </value>
       </member>
       <member>
        <name>current</name>
        <value>
         <int>1</int>
        </value>
       </member>
      </struct>
     </value>
     <value>
      <struct>
       <member>
        <name>id</name>
        <value>
         <string>3</string>
        </value>
       </member>
       <member>
        <name>name</name>
        <value>
         <string>En Deposito</string>
        </value>
       </member>
       <member>
        <name>entities_id</name>
        <value>
         <string>2</string>
        </value>
       </member>
       <member>
        <name>completename</name>
        <value>
         <string>Root entity &#62; CNBA &#62; En Deposito</string>
        </value>
       </member>
       <member>
        <name>comment</name>
        <value>
         <string/>
        </value>
       </member>
       <member>
        <name>level</name>
        <value>
         <string>3</string>
        </value>
       </member>
       <member>
        <name>is_recursive</name>
        <value>
         <string>1</string>
        </value>
       </member>
       <member>
        <name>current</name>
        <value>
         <int>1</int>
        </value>
       </member>
      </struct>
     </value>
     <value>
      <struct>
       <member>
        <name>id</name>
        <value>
         <string>4</string>
        </value>
       </member>
       <member>
        <name>name</name>
        <value>
         <string>EXTERNOS</string>
        </value>
       </member>
       <member>
        <name>entities_id</name>
        <value>
         <string>0</string>
        </value>
       </member>
       <member>
        <name>completename</name>
        <value>
         <string>Root entity &#62; EXTERNOS</string>
        </value>
       </member>
       <member>
        <name>comment</name>
        <value>
         <string/>
        </value>
       </member>
       <member>
        <name>level</name>
        <value>
         <string>2</string>
        </value>
       </member>
       <member>
        <name>is_recursive</name>
        <value>
         <string>1</string>
        </value>
       </member>
       <member>
        <name>current</name>
        <value>
         <int>1</int>
        </value>
       </member>
      </struct>
     </value>
     <value>
      <struct>
       <member>
        <name>id</name>
        <value>
         <string>5</string>
        </value>
       </member>
       <member>
        <name>name</name>
        <value>
         <string>Dada de Baja</string>
        </value>
       </member>
       <member>
        <name>entities_id</name>
        <value>
         <string>2</string>
        </value>
       </member>
       <member>
        <name>completename</name>
        <value>
         <string>Root entity &#62; CNBA &#62; Dada de Baja</string>
        </value>
       </member>
       <member>
        <name>comment</name>
        <value>
         <string/>
        </value>
       </member>
       <member>
        <name>level</name>
        <value>
         <string>3</string>
        </value>
       </member>
       <member>
        <name>is_recursive</name>
        <value>
         <string>1</string>
        </value>
       </member>
       <member>
        <name>current</name>
        <value>
         <int>1</int>
        </value>
       </member>
      </struct>
     </value>
    </data>
   </array>
  </value>
 </param>
</params>
</methodResponse>

REQUEST:
<?xml version="1.0" encoding="iso-8859-1"?>
<methodCall>
<methodName>glpi.setMyEntity</methodName>
<params>
 <param>
  <value>
   <struct>
    <member>
     <name>method</name>
     <value>
      <string>glpi.setMyEntity</string>
     </value>
    </member>
    <member>
     <name>entity</name>
     <value>
      <int>1</int>
     </value>
    </member>
    <member>
     <name>recursive</name>
     <value>
      <int>1</int>
     </value>
    </member>
    <member>
     <name>session</name>
     <value>
      <string>2apn531qt2jhfc430ar470bjl7</string>
     </value>
    </member>
   </struct>
  </value>
 </param>
</params>
</methodCall>

RESPONSE:
<?xml version="1.0" encoding="UTF-8"?>
<methodResponse>
<params>
 <param>
  <value>
   <array>
    <data>
     <value>
      <struct>
       <member>
        <name>id</name>
        <value>
         <string>1</string>
        </value>
       </member>
       <member>
        <name>completename</name>
        <value>
         <string>Root entity &#62; ConectarIgualdad</string>
        </value>
       </member>
      </struct>
     </value>
    </data>
   </array>
  </value>
 </param>
</params>
</methodResponse>

REQUEST:
<?xml version="1.0" encoding="iso-8859-1"?>
<methodCall>
<methodName>glpi.setTicketAssign</methodName>
<params>
 <param>
  <value>
   <struct>
    <member>
     <name>method</name>
     <value>
      <string>glpi.setTicketAssign</string>
     </value>
    </member>
    <member>
     <name>user</name>
     <value>
      <string>6</string>
     </value>
    </member>
    <member>
     <name>ticket</name>
     <value>
      <string>4594</string>
     </value>
    </member>
    <member>
     <name>session</name>
     <value>
      <string>2apn531qt2jhfc430ar470bjl7</string>
     </value>
    </member>
   </struct>
  </value>
 </param>
</params>
</methodCall>

RESPONSE:
<?xml version="1.0" encoding="UTF-8"?>
<methodResponse>
<fault>
 <value>
  <struct>
   <member>
    <name>faultCode</name>
    <value>
     <int>16</int>
    </value>
   </member>
   <member>
    <name>faultString</name>
    <value>
     <string>Command not allowed</string>
    </value>
   </member>
  </struct>
 </value>
</fault>
</methodResponse>

Last edited by damian (2015-09-01 12:29:59)

Offline

#19 2015-09-01 12:33:38

LaDenrée
HELPER
Registered: 2012-11-19
Posts: 6,287

Re: [webservices]: method glpi.setTicketAssign return Command not allowed

i'll update my webservice plugin on my test server and try to reproduce.

(i have slightly modified your post to make the discussion more readable using the "code" tag)


Trouver la panne avant de réparer...
GLPI10.0.16 (ubuntu 22.04 PHP8.1  Mariadb10.6 ) plugins : comportements 2.7.3 reports 1.16.0 formcreator 2.13.9, datainjection 2.13.5 fields 1.21.9

Offline

#20 2015-09-01 13:59:56

yllen
GLPI-DEV
From: Sillery (51)
Registered: 2008-01-14
Posts: 15,278

Re: [webservices]: method glpi.setTicketAssign return Command not allowed

This error is when the --user indicated has no right to be in charge of a ticket ins the entity of the ticket.

If your user has multi-entities, you must select in which entity you want to work.
So, before methodsetTicketAssign, you must call methodSetMyEntity to affect current entity of the user.


CentOS 6.5 - CentOS 7.x
PHP 5.6 - PHP 7.x - MySQL 5.6  - MariaDB 10.2 + APC + oOPcache
GLPI from 0.72 to dev version
Certifiée ITIL (ITV2F, ITILF, ITILOSA)

Offline

#21 2015-09-01 14:24:03

LaDenrée
HELPER
Registered: 2012-11-19
Posts: 6,287

Re: [webservices]: method glpi.setTicketAssign return Command not allowed

@ yllen :
looking at the post #18
damian logged in the set profile to superadmin, then set entity to 1 (same as ticket) .
the response of webservices is ok ( profile=super-admin  & entity=root>ConectarIgualdad)
then called methodsetTicketAssign.

what surprises me is that entity id is -1 for root. i thought root had id=0;

@Damian :

you wrote (#9)  that with helpdesk interface user Damian(with superadmin profile on entity #1 ) can assign tickets#4594  to Damian : can you confirm ?


Trouver la panne avant de réparer...
GLPI10.0.16 (ubuntu 22.04 PHP8.1  Mariadb10.6 ) plugins : comportements 2.7.3 reports 1.16.0 formcreator 2.13.9, datainjection 2.13.5 fields 1.21.9

Offline

#22 2015-09-01 15:07:37

yllen
GLPI-DEV
From: Sillery (51)
Registered: 2008-01-14
Posts: 15,278

Re: [webservices]: method glpi.setTicketAssign return Command not allowed

I don't understand.
root>ConectarIgualdad is not root entity but a sub entity.


CentOS 6.5 - CentOS 7.x
PHP 5.6 - PHP 7.x - MySQL 5.6  - MariaDB 10.2 + APC + oOPcache
GLPI from 0.72 to dev version
Certifiée ITIL (ITV2F, ITILF, ITILOSA)

Offline

#23 2015-09-01 15:53:50

LaDenrée
HELPER
Registered: 2012-11-19
Posts: 6,287

Re: [webservices]: method glpi.setTicketAssign return Command not allowed

@ yllen
forget id=-1 for root; (entity_id is different from id )
I did not see the difference between "entity_id" and "id"  ( sorry)

in webservice response(list my entities)
root>in deposito has id=3
root>CNBA has  id=2
root>ConectarIgualdad has id=1 (that seems ok)
root  has id=0


Trouver la panne avant de réparer...
GLPI10.0.16 (ubuntu 22.04 PHP8.1  Mariadb10.6 ) plugins : comportements 2.7.3 reports 1.16.0 formcreator 2.13.9, datainjection 2.13.5 fields 1.21.9

Offline

#24 2015-09-03 05:28:31

damian
Member
Registered: 2015-07-27
Posts: 29

Re: [webservices]: method glpi.setTicketAssign return Command not allowed

LaDenrée wrote:

@ yllen :
looking at the post #18
damian logged in the set profile to superadmin, then set entity to 1 (same as ticket) .
the response of webservices is ok ( profile=super-admin  & entity=root>ConectarIgualdad)
then called methodsetTicketAssign.

what surprises me is that entity id is -1 for root. i thought root had id=0;

@Damian :

you wrote (#9)  that with helpdesk interface user Damian(with superadmin profile on entity #1 ) can assign tickets#4594  to Damian : can you confirm ?



Yes!! I confirm that I can Assign user damian to the ticket, I'll try to upload an image

Offline

#25 2015-09-03 05:34:13

damian
Member
Registered: 2015-07-27
Posts: 29

Re: [webservices]: method glpi.setTicketAssign return Command not allowed

The Ticket is not assigned to damian

11958246_10207259704513051_6151794317742258480_o.jpg


Now, via helpdesk interface, damian has assigned the ticket (in the botton left of 2nd image you can see that user damian is id=6)

11950380_10207259705233069_7667519871387986983_o.jpg

Last edited by damian (2015-09-03 05:40:52)

Offline

Board footer

Powered by FluxBB