solution.js
solution.js copied to clipboard
Organization URL key should be lower case
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.