Loïc C. Chanel created RANGER-4738:
--------------------------------------

             Summary: Implement the creation of external user via Python API
                 Key: RANGER-4738
                 URL: https://issues.apache.org/jira/browse/RANGER-4738
             Project: Ranger
          Issue Type: Improvement
          Components: Ranger
    Affects Versions: 2.4.0
            Reporter: Loïc C. Chanel


Hi team,

I noticed the creation of external user is not possible using the Python API. 
The improvement is fairly simple, we just have to modify 
ranger_user_mgmt_client.py file to include the following lines :

After line 34
{code:python}
    def create_user_ext(self, user):
        resp = self.client_http.call_api(RangerUserMgmtClient.CREATE_USER_EXT, 
request_data=user)
        return type_coerce(resp, RangerUser)
{code}
After line 163
{code:python}
    URI_XUSERS_USERS_EXT             = URI_XUSERS_BASE + '/users/external'
{code}
After line 177
{code:python}
    CREATE_USER_EXT= API(URI_XUSERS_USERS_EXT, HttpMethod.POST, 
HTTPStatus.NO_CONTENT)
{code}
Although the modification is minor, this would allow the creation of external 
user trough Python API.

Thanks,



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to