Skip to content

Commit

Permalink
Doc/high risk employee (#118)
Browse files Browse the repository at this point in the history
* add userguide

* link userguide

* departing > high risk

* departing > high risk

* add section on adding/removing risk factors

* headings

* wrap long lines

* remove the unneeded
  • Loading branch information
timabrmsn committed Jun 4, 2020
1 parent adb942c commit 89185b8
Show file tree
Hide file tree
Showing 2 changed files with 68 additions and 0 deletions.
1 change: 1 addition & 0 deletions docs/guides.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,5 @@
* [Basics](userguides/basics.md)
* [Executing Searches](userguides/searches.md)
* [Departing Employee](userguides/departingemployee.md)
* [High Risk Employee](userguides/highriskemployee.md)
* [Get Active Devices From An Organization](userguides/orgdevices.md)
67 changes: 67 additions & 0 deletions docs/userguides/highriskemployee.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,67 @@
# High Risk Employee

## Add or Remove Users From the High Risk Employee List

Use py42 to quickly and easily manage users on the High Risk Employee list. This guide describes how to add users to and
remove users from the High Risk Employee list.

To add a user to the High Risk Employees list, all you need to know is the user's Code42 user UID.

To get the user UID based on username:

```python
user = sdk.users.get_by_username("username")
uid = user["users"][0]["userUid"]
```

`user_id` below refers to the user UID.

```python
# Add the high risk employee
response = sdk.detectionlists.high_risk_employee.add(user_id)
```

```eval_rst
.. important::
If the user is already in the High Risk Employee list, you will get a response indicating that it is a
bad request.
If a detection list user profile doesn't exist yet for this user, one will automatically be created before adding
the user to the High Risk Employee list.
```

To remove a user from the High Risk Employee list:
```python
sdk.detectionlists.high_risk_employee.remove(user_id)
```

For complete details, see
[High Risk Employee](../methoddocs/detectionlists.html#high-risk-employee).


##
Add or Remove Risk Factors From Users

You can add/remove risk factor tags from a user programmatically using the `add_user_risk_tags()` and
`remove_user_risk_tags()` methods in the `detectionlists` module. Both methods take a user_id and a list of tags that
you want to add/remove:

```python
tag_list = ["CONTRACT_EMPLOYEE", "ELEVATED_ACCESS_PRIVILEGES"]

# Add the risk tags
response = sdk.detectionlists.add_user_risk_tags(user_id, tag_list)

# Remove the risk tags
response = sdk.detectionlists.remove_user_risk_tags(user_id, tag_list)
```

The available risk tags are:

- `HIGH_IMPACT_EMPLOYEE`
- `ELEVATED_ACCESS_PRIVILEGES`
- `PERFORMANCE_CONCERNS`
- `FLIGHT_RISK`
- `SUSPICIOUS_SYSTEM_ACTIVITY`
- `POOR_SECURITY_PRACTICES`
- `CONTRACT_EMPLOYEE`

0 comments on commit 89185b8

Please sign in to comment.