Esri / solution.js

TypeScript wrappers running in Node.js and modern browsers for transferring ArcGIS Online items from one organization to another.
https://esri.github.io/solution.js/
Apache License 2.0
39 stars 12 forks source link

Organization URL key should be lower case #1358

Open philnagel opened 8 months ago

philnagel commented 8 months ago

When deploying items that have a url property, the subdomain that corresponds to the organization short name (e.g. https://<shortname>.maps.arcgis.com) should be lower-case, even if the org short name is upper case. Since this is a subdomain, it is case-insensitive by definition and should be safe to make lower-case by default (see https://www.rfc-editor.org/rfc/rfc4343)

The implication of this (and it seems like a bug in AGOL) is as follows: When an item is shared to a group with members from a different org, and members from that org access the item via their own org, the subdomain / org short name is adjusted by AGOL to match that of the current user's org. For example, if nmpw is the org in which the item is created, and bmi is the org it has been shared with, https://nmpw.maps.arcgis.com/apps/instant/sidebar/index.html?appid=a12777eb497449008bbfae34cee222c2 becomes https://bmi.maps.arcgis.com/apps/instant/sidebar/index.html?appid=a12777eb497449008bbfae34cee222c2 If a user from org bmi tries accessing the item via the nmpw URL, they will be prompted to log in to the nmpw org, even though they can access the item via their bmi account. When the subdomain / org short name is in upper case in the item's properties JSON, this translation does not seem to work and the URL presented to the bmi user. To access the item via the AGOL UI, the user would need to manually copy the link, paste it in the browser, and modify the subdomain to match their own org.

I have observed this behavior with several solutions deployed via the official ESRI solution page.

299463977-b7d82cfc-41d1-40fd-873e-9983cce24026

299463913-b72b8491-059a-4882-949c-1ced217086f1

299464518-47e93c98-fd65-41e2-83a7-e74f4a5893a2

MikeTschudi commented 8 months ago

Thank you, @philnagel. Handling this via the solution deployment app.