Esri / ArcREST

python package for REST API (AGS, AGOL, webmap JSON, etc..)
Apache License 2.0
192 stars 155 forks source link

Unable to disable esri access (userType='arcgisonly') #301

Closed sirws closed 7 years ago

sirws commented 7 years ago

I am trying to disable Esri access and it doesn't seem to pass the usertype:"arcgisonly" in the request. Enabling does seem to work.

admin = arcrest.manageorg.Administration(securityHandler=shh.securityhandler, initialize=True)
portal = admin.portals.portalSelf
commUsers = portal.users(start=1, num=100)
commUsers = commUsers['users']
for commUser in commUsers:
    user = admin.community.users.user(commUser.username)
    print commUser.username + ": " + commUser.userType
    #print (user.update(userType="both"))   ENABLING ESRI ACCESS WORKS
   print (user.update(userType="arcgisonly")) #DISABLING ESRI ACCESS DOES NOT WORK
MikeMillerGIS commented 7 years ago

Scott, this commit should fix the issue https://github.com/Esri/ArcREST/commit/c4268f20edaebe02a2bc575b7772dc8b8660d520