Example #1
0
def test_update_user_when_given_cloud_alias_first_removes_old_alias(
    sdk, user_response_with_cloud_aliases, mock_user_id
):
    sdk.detectionlists.get_user_by_id.return_value = user_response_with_cloud_aliases
    update_user(sdk, MOCK_USER_NAME, cloud_alias="*****@*****.**")
    sdk.detectionlists.remove_user_cloud_alias.assert_called_once_with(
        MOCK_USER_ID, MOCK_ALIAS
    )
Example #2
0
def _add_high_risk_employee(sdk, username, cloud_alias, risk_tag, notes):
    risk_tag = handle_list_args(risk_tag)
    user_id = get_user_id(sdk, username)
    sdk.detectionlists.high_risk_employee.add(user_id)
    update_user(sdk,
                username,
                cloud_alias=cloud_alias,
                risk_tag=risk_tag,
                notes=notes)
Example #3
0
def _add_departing_employee(sdk, username, cloud_alias, departure_date, notes):
    if departure_date:
        departure_date = departure_date.strftime(DATE_FORMAT)
    user_id = get_user_id(sdk, username)
    sdk.detectionlists.departing_employee.add(user_id, departure_date)
    update_user(sdk, username, cloud_alias=cloud_alias, notes=notes)
def _add_departing_employee(sdk, username, cloud_alias, departure_date, notes):
    user_id = get_user_id(sdk, username)
    sdk.detectionlists.departing_employee.add(user_id, departure_date)
    update_user(sdk, username, cloud_alias=cloud_alias, notes=notes)