Comments

5 comments

  • Avatar
    hui

    This account has all permissions

    The same error occurs with the admin account

     

    0
    Comment actions Permalink
  • Avatar
    Andrey Terentyev

    Hello,

    It seems to be a bug. Thank you for calling attention.

    JIRA-VMS-37244

    0
    Comment actions Permalink
  • Avatar
    Reeve Hsu

    I am experiencing exactly the same issue. May I know when can it be fixed? Andrey Terentyev

    0
    Comment actions Permalink
  • Avatar
    Andrey Terentyev

    Gentlemen, the bug has been just registered. No term for now.

    0
    Comment actions Permalink
  • Avatar
    Andrey Terentyev

    Hello,

    The bug is in the web interface application, not in the API function.

    Here is a recommended way to test and use this API.

    1. According to the documentation "isOwner" should be false when creating a new user.

    2. Don't use server web interface for testing this API. Use a python script, for example this one

    https://github.com/networkoptix/nx_open_integrations/blob/master/python/examples/authentication/local_bearer.py

    here is what I modified in the script for creating a new user

    payload = {"name": "test1", "email": "", "type": "local", "isOwner": False, "isEnabled": True, "isHttpDigestEnabled": True, "password": "345sdfg1345awsdf"}
    get_method_header = create_header(primary_token)
    system_info = request_api(LOCAL_URL, f'/rest/v1/users', 'POST', verify=False,
                                  headers=get_method_header, json=payload)

    3. Make sure your session (i.e. token) is not older than 10 min.

    0
    Comment actions Permalink

Please sign in to leave a comment.