arcgis-rest-js icon indicating copy to clipboard operation
arcgis-rest-js copied to clipboard

isOrgAdmin should be sync

Open tomwayson opened this issue 4 years ago • 1 comments

This fn:

https://github.com/Esri/arcgis-rest-js/blob/d174facfb9b73dfd207313019cf2858a012dc798/packages/arcgis-rest-portal/src/sharing/helpers.ts#L45-L53

should take a user and return a boolean synchronously.

Also, I'm not sure how/why that fn does not appear in the docs, but maybe that means we can do this w/o a breaking change.

tomwayson avatar Mar 22 '21 18:03 tomwayson

This is now in the documentation: https://developers.arcgis.com/arcgis-rest-js/api-reference/arcgis-rest-portal/isOrgAdmin

gavinr avatar Sep 20 '22 16:09 gavinr

This is async because user data isn't fetched by default. session.getUser will fetch the data if it isn't already fetched and cache it locally for the duration of the session.

Since this now appears in the docs I'm closing this.

patrickarlt avatar Oct 13 '22 19:10 patrickarlt