MantisBT - TestLink
View Issue Details
0008065TestLinkUsers and Rightspublic2017-08-29 19:432018-04-14 09:04
normalfeature requestalways
PCWindows7 Pro
1.9.16 (2016 Q4) 
1.9.17 (2018 Q1) 
Chrome v.58
0008065: user rights at project level should be also considered
It seems that the role given to a user at the project level (and associated rights) are not checked when the user wants to create test case results using TestLink API (for ex. XMLRPC)

As an example, a guest user in TestLink having the role = leader in his project cannot create a platform using XMLRPC scripting even if the platform_management right is checked for a leader.
To fix this, the user with role = guest in TestLink must be defined as a leader in TestLink, then the script is ok and platform is created in TestLink.

Enhancement: the role assigned to a user in a project should be also considered and not just the role when the user is created in TestLink.

Consequence: It is important that TestLink in future release can manage multiple projects with multiple teams.
By default in TestLink, users are created with role=guest and then, are assigned to another role (tester, leader, senior tester, etc) in their respective project.
As soon as they are using external mechanisms (API, automation scripts..) to import/create stuff in TestLink, they are facing this issue with "not enough rights to perform..."
see [^] as reference
No tags attached.
related to 0008072closed fman reportTCresult fails when plan is non-public and user access is "< inherited > rights" 
child of 0007817closed fman Availables hot-fixes for 1.9.16 & How To get full fixed package from GitHub 
png insufficient rights.png (9,455) 2017-09-05 18:45

png Screen Shot 2017-09-09 at 13.08.54.png (82,127) 2017-09-09 11:11

? clientCreatePlatformDOVI.php (1,120) 2017-09-09 11:11
Issue History
2017-08-29 19:43tjosephineNew Issue
2017-08-30 16:17fmanQA Team - Task Workflow Status => TBD
2017-08-30 16:17fmanView Statusprivate => public
2017-08-30 16:18fmanNote Added: 0026796
2017-08-30 16:19fmanAssigned To => fman
2017-08-30 16:19fmanStatusnew => feedback
2017-08-30 16:32fmanNote Added: 0026803
2017-08-30 18:57tjosephineNote Added: 0026804
2017-08-30 18:57tjosephineStatusfeedback => assigned
2017-08-30 19:42fmanNote Added: 0026805
2017-08-30 19:44fmanNote Added: 0026806
2017-08-30 19:44fmanStatusassigned => feedback
2017-08-30 20:08tjosephineNote Added: 0026808
2017-08-30 20:08tjosephineStatusfeedback => assigned
2017-08-30 20:09tjosephineNote Edited: 0026808bug_revision_view_page.php?bugnote_id=26808#r5342
2017-08-30 20:09tjosephineNote Edited: 0026808bug_revision_view_page.php?bugnote_id=26808#r5343
2017-08-30 20:15fmanNote Added: 0026809
2017-09-02 07:17fmanQA Team - Task Workflow StatusTBD => READY FOR TESTING
2017-09-02 07:17fmanNote Added: 0026814
2017-09-02 07:17fmanStatusassigned => resolved
2017-09-02 07:17fmanFixed in Version => 1.9.17 (2018 Q1)
2017-09-02 07:17fmanResolutionopen => fixed
2017-09-05 18:44tjosephineNote Added: 0026820
2017-09-05 18:45tjosephineFile Added: insufficient rights.png
2017-09-09 10:57fmanNote Added: 0026828
2017-09-09 10:59fmanNote Edited: 0026828bug_revision_view_page.php?bugnote_id=26828#r5352
2017-09-09 11:01fmanNote Edited: 0026828bug_revision_view_page.php?bugnote_id=26828#r5353
2017-09-09 11:10fmanNote Edited: 0026828bug_revision_view_page.php?bugnote_id=26828#r5354
2017-09-09 11:11fmanFile Added: Screen Shot 2017-09-09 at 13.08.54.png
2017-09-09 11:11fmanFile Added: clientCreatePlatformDOVI.php
2017-09-09 11:12fmanNote View State: 0026828: public
2017-09-09 11:13fmanRelationship addedrelated to 0008072
2017-09-11 20:15tjosephineNote Added: 0026831
2017-09-12 04:30fmanRelationship addedchild of 0007817
2018-04-14 09:04fmanNote Added: 0027315
2018-04-14 09:04fmanStatusresolved => closed

2017-08-30 16:18   
as always requested detailed steps to reproduce are needed.
without this is impossible to work on this.

2017-08-30 16:32   
why 0008058 is a reference ?this issue has been solved
2017-08-30 18:57   
Steps to reproduce? You already tested in 0008058:

Tested on MAC OS using mamp Pro, using latest code from github

1. created user XMLRPC-API-INTEGRATION, with role GUEST
2. create a new role xmlrpc-api-integration with JUST one right platform-management
3. login as XMLRPC-API-INTEGRATION, generate API Key
4. use clientCreatePlatform.php
5. Platform created without issues

Tested on 1.9.16 => no issue

We got this issue with TestLink 1.9.15 and to fix it, we had to create user with a role having the platform-management right.
We plan to upgrade TestLink to 1.9.16 in a couple of weeks, so we will be able to test by ourselves.

Thanks for your support!
2017-08-30 19:42   
The steps you have provided do not help to reproduce your situation.
I think I've already fixed it, but really think that the minimum help I'm asking has to be provided

Re-reading the steps on previous issue is a missin step => assign the new created role the user.
2017-08-30 19:44   
Please use this, retest and provide feedback
2017-08-30 20:08   
(edited on: 2017-08-30 20:09)
As soon as we upgrade to version 1.9.16, I will retest and provide feedback.

Just a comment on the missing step => assign the new created role to the user:
Do you assign the new role to the user in a project? or do you replace guest by xmlrpc-api-integration in TestLink?

Because this is the problem. In our case:
- user is guest in TestLink and
- user is leader in ProjectX
when user executes python script to create a platform in ProjectX, it gets an issue "no platform management rights"

if instead,
- user is leader in TestLink
- user is leader in the project ProjectX (inherited)
No issue, platform created in ProjectX when running the script.

I will provide feedback as soon as possible.


2017-08-30 20:15   
>> Do you assign the new role to the user in a project? or do you replace guest by xmlrpc-api-integration in TestLink?

I did what is explained => GLOBAL role has been changed.

That's why I request that you provide the steps to reproduce, instead of guess conclusions from other tests.
2017-09-02 07:17   
no more user feedback
2017-09-05 18:44   
I just tested with TestLink 1.9.16 + latest fix package on my local environment (windows)

Steps to reproduce:
- create user lmcpcar with default role (guest) in TestLink
- create project ProjectX1 and give role = leader to lmcpcar in this project.
- login to TestLink with user = lmcpcar and create devkey for lmcpcar
- Update php script "clientCreatePlatform.php" by providing the devkey, project name ProjectX1, the platform name and notes
- execute the script

Error generated: "User lmcpcar, corresponding to Developer Key has insufficient rights to perform this action - Details: right platform_management"
[IMG][/IMG] [^]

If I change and replace role=guest with role=leader for lmcpcar, there is no error and the platform is created in ProjectX1.

It seems that when executing the script, the role assigned to lmcpcar in ProjectX1 is not taken into account.

Enhancement: the role assigned to a user in a project should be also considered when checking the rights and not just the GLOBAL role in TestLink.
2017-09-09 10:57   
(edited on: 2017-09-09 11:10)
1. get latest code from github (@20170909 - 13:00 CET)
2. do fresh install
3. login as admin
4. create test project PUBLIC => MOTOGP MISANO 2017
5. create test project PUBLIC => MOTOGP ASSEN 2017

6. create user dovizioso with default role GUEST
7. assign role leader to dovizioso on MOTOGP MISANO 2017
8. generate API KEY for dovizioso
9. use attached clientCreatePlatformDOVI.PHP fiel
10. tests OK => see images

2017-09-11 20:15   
Fresh install with latest code from github (extracted from [^])

I confirm it is working as expected.
User dovizioso (guest in TestLink and leader in project MOTOGP MISANO 2017)
was able to create successfully a platform in project MOTOGP MISANO 2017.

Thanks a lot!
(It seems that my latest fix package apparently was not the latest one! I will update my previous installation and will do the tests again)
2018-04-14 09:04   
release 1.9.17