Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Restrict access to certain TeamCity projects

We have a TeamCity instance with a variety of projects and build configurations on it, with no security set up at present. Although it's OK for most of the projects to be publicly visible, we'd like to set up a couple of projects that are only visible to certain users.

Because there are many public projects already set up on the server, across a variety of teams, we'd like to avoid setting up restrictions on everything - that is, we'd rather use "deny access to project Z" than "allow access to project A, allow access to project B, ..., allow access to project Y".

How can I restrict access to these projects without affecting the public projects?

like image 545
Tim Robinson Avatar asked May 10 '12 16:05

Tim Robinson


People also ask

How do I add a user to a TeamCity project?

On the Administration | Users page, select users, click the Add to groups button at the bottom, and specify the groups to add the users to.

How do I create a TeamCity role?

If per-project permissions are enabled in your installation, you can view the existing roles, modify them, and create new ones in the TeamCity UI — on the Administration | Roles page. It allows: Creating new roles.

How do I disable TeamCity build?

On the Project Settings page, open the Actions menu and click Pause/Activate. In the dialog that opens, clear the box next to the project to activate all its build configurations or clear the boxes of the configurations selectively: the unselected build configurations will be activated. Add an optional comment.


2 Answers

In case anyone still needs an answer, this can be done by TeamCity itself.

  1. Go to Administration -> Groups -> 'Create new group'. For example, public
  2. Assign roles to this group. You can choose 'Grant role in selected projects' radio button and choose those public projects and click Assign button.
like image 93
Bruce Liu Avatar answered Sep 30 '22 23:09

Bruce Liu


I wanted to Create 'Testers' group and give them permission to trigger deployments for 'Test Build Configuration' only. Here is what I did. (BTW, this is TC 9.1 )

  1. Go and 'Enable Per Project Permissions' enter image description here

  2. Created a role 'Project Tester' under 'Roles' and assign permissions 'run build' to the role enter image description here

  3. Created a group 'Test Team' and assigned the role 'Project Tester' to it.

enter image description here

And obviously, add the users to the group. Hope that helps someone.

like image 44
Illuminati Avatar answered Oct 01 '22 00:10

Illuminati