Skip to content

Commit

Permalink
feat(coreapi): adds api to update user role in project
Browse files Browse the repository at this point in the history
  • Loading branch information
pallabpain committed Aug 24, 2023
1 parent 5b2bacd commit 4770559
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions rapyuta_io/clients/core_api_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -149,6 +149,13 @@ def remove_user_from_project(self, project_guid, user_guid):
response = RestClient(url).method(HttpMethod.DELETE).headers(headers).execute(payload)
get_api_response_data(response, parse_full=True)

def update_user_role(self, project_guid, user_guid, user_role=None):
url = '{}{}/{}/updaterole'.format(self._core_api_host, self.PROJECT_PATH, project_guid)
headers = create_auth_header(self._auth_token, self._project)
payload = {'userGUID': user_guid, 'userRole': user_role}
response = RestClient(url).method(HttpMethod.PUT).headers(headers).execute(payload)
get_api_response_data(response, parse_full=True)

def create_secret(self, secret):
url = self._core_api_host + self.SECRET_PATH + '/create'
headers = create_auth_header(self._auth_token, self._project)
Expand Down

0 comments on commit 4770559

Please sign in to comment.