arcgis-rest-js
arcgis-rest-js copied to clipboard
isOrgAdmin should be sync
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.
This is now in the documentation: https://developers.arcgis.com/arcgis-rest-js/api-reference/arcgis-rest-portal/isOrgAdmin
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.