Skip to content

Commit eac4611

Browse files
Merge branch 'master' into DU-40/Shared_Plans
2 parents bf8adae + 6a099b9 commit eac4611

File tree

4 files changed

+99
-0
lines changed

4 files changed

+99
-0
lines changed

_includes/enterprise_sidebar.html

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@ <h3>Enterprise Operations Manual</h3>
3535
<li><a href="/user/enterprise/ssl-certificate-management/">SSL Certificate Management</a></li>
3636
<li><a href="/user/enterprise/troubleshooting-guide/">Troubleshooting Guide</a></li>
3737
<li><a href="/user/enterprise/user-management/">User Management</a></li>
38+
<li><a href="/user/enterprise/user-management-in-admin/">User Management Commands</a></li>
3839
<li><a href="/user/enterprise/user-role-management/">User Role Management</a></li>
3940
<li><a href="/user/enterprise/support-admin-tool/">Support Admin Tool</a></li>
4041
<li><a href="/user/enterprise/Multi-CPU-Builds/">Multi CPU builds</a></li>
Lines changed: 98 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,98 @@
1+
---
2+
title: User Management Commands
3+
layout: en_enterprise
4+
5+
---
6+
7+
Travis CI Enterprise (TCIE) offers a new tab for admin users utilizing `admin-v2`, the **User Activity** tab, where admin users can see `active` or `inactive` users and suspend or unsuspend specific users.
8+
9+
> Note: An `active` user is a user who utilizes the system and not necessarily a user consuming a license.
10+
11+
This section describes how to obtain and use an Organizational-level token.
12+
13+
## Obtain Organization-level token
14+
15+
A new token authorization method was introduced in Travis API **org.token**. An organization-level access token that grants permissions to perform platform-level administrative commands via APIs.
16+
17+
Travis CI Enterprise platform admin users require a list of active and inactive user accounts to make informed decisions about whether to suspend accounts. TCIE admin users can now obtain and regenerate organization-level tokens (OTP secured). Each token has a predefined permission. Currently, there are two possible usages for Organization-level tokens: checking user activity and suspending or unsuspending users in the organization.
18+
19+
Navigate to the API Tokens section at the bottom of the Travis admin V2 Organization page. Under the Organization tab, scroll down to the **API** section.
20+
21+
This section displays the API key of the Organization.
22+
Click the “Copy” button to copy the token.
23+
Click the “Re-generate” button to generate a new token.
24+
25+
The token is hidden by default, and by clicking the **View** button, the token is displayed.
26+
27+
> Note: This section is for admin users only.
28+
29+
## How to use Organization-level tokens
30+
31+
Users can now use the following new API endpoint:
32+
```
33+
/org/:id/user_activity
34+
```
35+
36+
Here is an example of using the command for looking for active users since Feb. 21st, 2025:
37+
```
38+
curl -L -v -s -k -X GET \
39+
-H "Content-Type: application/json" \
40+
-H "Accept: application/json" \
41+
-H "Travis-API-Version: 3" \
42+
-H "Authorization: org.token <organization id in admin-v2>:<paste your org.token here>" \
43+
"https://[instance]/org/:[org id]/user_activity?date=2025-02-21&status=active"
44+
```
45+
46+
Using a GET request allows users to retrieve a list of active and inactive users for a specified time between the current date and any specified date.
47+
48+
The status parameter accepts the `active` or `inactive` values. And enter the `date` param using the `yyyy-mm-dd` format.
49+
50+
## Suspending and Unsuspending Users
51+
52+
The following new endpoints were introduced and can be used to suspend or unsuspend users.
53+
54+
```
55+
/org/:id/suspend
56+
/org/:id/unsuspend
57+
/users/suspend
58+
/users/unsuspend`
59+
```
60+
To suspend users based on their Travis CI ID, use the following:
61+
```
62+
{ "user_ids" : [1,2...]}
63+
```
64+
65+
To suspend users based on their VCS TYPE and ID, use the following:
66+
```
67+
{ "vcs_type":"github", "vcs_ids": [100,101..]}
68+
```
69+
70+
### Bulk Suspension
71+
Travis CIE admin users can bulk suspend users via API or CLI by providing a list of users with their VCS IDs.
72+
73+
74+
## User Activity
75+
76+
![User Activity Tab](/user/images/user-activity-tab-tcie.png)
77+
78+
The new **User Activity** tab, available from the top bar, was introduced to Travis CI Enterprise, allowing admin users to manage Enterprise users within the organization.
79+
80+
In this section, you can obtain a CSV file containing a list of active and inactive users for a specified date. Simply, enter a `Date From` to generate a list of Active and Inactive users.
81+
82+
## Suspend Users
83+
84+
![Suspend Users](/user/images/suspend-users-screen.png)
85+
86+
With the list you generated, you can select a subset of users for suspension by uploading a CSV file containing only the users you want to suspend.
87+
88+
Once the file is uploaded, you can suspend all users from the uploaded file.
89+
90+
Use the **Suspend** button to suspend any user from the list.
91+
92+
You can also unsuspend users by viewing the Suspend users list and clicking the **Unsuspend** button.
93+
94+
> Note: The old Enterprise Users page is now a section of the new User Activity page.
95+
96+
## Contact Enterprise Support
97+
98+
{{ site.data.snippets.contact_enterprise_support }}

user/images/suspend-users-screen.png

37.4 KB
Loading
58.4 KB
Loading

0 commit comments

Comments
 (0)