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

#26 2015-09-03 10:49:15

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

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

Have you call call methodSetMyEntity to affect  entity ConectarIgualdad before call methodsetTicketAssign?


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

#27 2015-09-03 17:39:18

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

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

Yes!, please take a look at post #18, I send SetMyEntity(1) just before setTicketAssing

Offline

#28 2015-09-04 09:54:14

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

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

What is the status of your 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

#29 2015-09-04 13:58:37

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

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

yllen wrote:

What is the status of your ticket?

The ticket is open (planned)

Offline

#30 2015-09-04 18:11:19

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, i have no problem with webservices at my job.


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

#31 2015-09-04 23:21:13

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

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

yllen wrote:

I don't understand, i have no problem with webservices at my job.


Have you glpi 8.5.4 and webservices 1.5.0 ?

Offline

#32 2015-09-05 16:20:44

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

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

yllen wrote:

I don't understand, i have no problem with webservices at my job.


In your banner you said that you have GLPI 0.83.8 svn and  GLPI 0.85 SVN I was asking if we're testing the bug in the same software enviroment

Last edited by damian (2015-09-05 21:24:10)

Offline

#33 2015-09-06 11:04:16

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

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

Behavior confirmed  :

GLPI 0.85.4/WEBSERVICES 1.5.0/ Wampserver 2.4

using xmlrpc ;
webservices called from a test.php file;

logged in : reponse OK
set my entity to "1" (same as ticket) response : OK entity set
set my profile to "4" response :  OK profile set to super admin
call setticket assign : response KO : xmlrpc error(16): Command not allowed

ticket is ok, I can assign ticket to me in helpdeskinterface in this entity with this profile.

still investigating, but really looks like a bug, isn't it ?


Trouver la panne avant de réparer...
GLPI10.0.10 (ubuntu 22.04 PHP8.1  Mariadb10.6 ) plugins : comportements 2.7.2 reports 1.16.0 formcreator 2.13.8, datainjection 2.13.4 fields 1.21.6

Offline

#34 2015-09-06 14:07:23

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

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

here's  SQL query used by checkusersRights :  ( methodcommon.class.php)

$query = "SELECT `glpi_profilerights`.`rights`
                FROM `glpi_profilerights`
                LEFT JOIN `glpi_profiles`
                   ON (`glpi_profiles`.`id` = `glpi_profilerights`.`profiles_id`
                INNER JOIN `glpi_profiles_users`
                   ON (`glpi_profiles`.`id` = `glpi_profiles_users`.`profiles_id`)
                WHERE `glpi_profiles_users`.`users_id` = '$user'
                      AND `glpi_profilerights`.`name` = '$right'
                      AND (`glpi_profilerights`.`rights` & ". $valright.") ".
                      getEntitiesRestrictRequest(" AND ", "glpi_profiles_users", '', $entity, true);

I think ")" is missing somewhere. I would write :

$query = "SELECT `glpi_profilerights`.`rights`
                FROM `glpi_profilerights`
                LEFT JOIN `glpi_profiles`
                   ON (`glpi_profiles`.`id` = `glpi_profilerights`.`profiles_id`)
                INNER JOIN `glpi_profiles_users`
                   ON (`glpi_profiles`.`id` = `glpi_profiles_users`.`profiles_id`)
                WHERE `glpi_profiles_users`.`users_id` = '$user'
                      AND `glpi_profilerights`.`name` = '$right'
                      AND (`glpi_profilerights`.`rights` & ". $valright.") ".
                      getEntitiesRestrictRequest(" AND ", "glpi_profiles_users", '', $entity, true);


Trouver la panne avant de réparer...
GLPI10.0.10 (ubuntu 22.04 PHP8.1  Mariadb10.6 ) plugins : comportements 2.7.2 reports 1.16.0 formcreator 2.13.8, datainjection 2.13.4 fields 1.21.6

Offline

#35 2015-09-06 14:13:52

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

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

That was it.

now it works fine.


Trouver la panne avant de réparer...
GLPI10.0.10 (ubuntu 22.04 PHP8.1  Mariadb10.6 ) plugins : comportements 2.7.2 reports 1.16.0 formcreator 2.13.8, datainjection 2.13.4 fields 1.21.6

Offline

#36 2015-09-06 16:14:06

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

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

YES!....!  I confirm!!  I modify  methodcommon.class.php and now is working as expected!

Thank you ....
Can you fix this in the new version?

PD: I find 2 more bugs, One is posted to this phorum (related to (I think) a bug in methodinventaire.class.php line 579 )  and the other I found this week related to glpi.getTicket (shows ticket not found when the ticket exists and I have permission to see and modify it)  .  Can you also help me with those bugs?


Again, Thank You in advance!

Offline

#37 2015-09-06 18:09:50

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

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

Corrigé


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

Board footer

Powered by FluxBB