Join 34,000+ subscribers and receive articles from our blog about software quality, testing, QA and security.
 

Changing the automatic default access for new projects


#1

Hi,

When creating new projects is there any way to automatically set the default access to anything other than Global Role (open to everyone)?

Over the last few months we have worked to limit access to each existing project to only the related group of users.

However every time a project is created, by default it is open to everyone for editing. With so many people creating new data this is hard to manage.

At the very least I’d like to be able to set the default access to read-only until someone has had time to review it and set the desired long-term selection.

Please advise.

Thanks
Atour


#2

Hello Atour,

Thanks for your posting. Yes, it is possible to customize this using UI scripts:

http://docs.gurock.com/testrail-custom/uiscripts-introduction

I’m also happy to provide an example for this and would get back to you then (most likely tomorrow).

Regards,
Tobias


#3

Thanks for the quick reply, Tobias.

As suggested, I’d appreciate it if you could give me an example and I’ll look to make use of the UI script functionality to get it working for us.


#4

The following UI script sets the default access for new projects to No Access:

[code]name: Hello world
description: Shows a ‘Hello, world!’ message on the dashboard
author: Gurock Software
version: 1.0
includes: ^admin/projects/add
excludes:

js:
(document).ready( function() { (’#access’).val(-2);
}
);[/code]

If you use a positive number instead of -2, you set the default access to a specific role. The number is then equivalent to the ID of the role. E.g., the ID of the default role “Guest” would be 4. You can find out the IDs under the Administration > Users & Roles tab when hovering over the roles (the ID is then part of the URL).

I hope this helps and please let me know in case you have any questions!

Regards,
Tobias


#5

Thanks, Tobias. That’s just what i needed.


#6

You are welcome, Atour!

Regards,
Tobias


#7

Thx. This works if you set argument of val to ‘No Access’