Esri / Esri/solution.js

Organization URL key should be lower case

Open
#1,358 1 comment 0 reactions 0 assignees View on GitHub
Dominant language
TypeScript
Stars
48
Forks
16
PR merge metrics
No merged PRs in 30d

Description

When deploying items that have a `url` property, the subdomain that corresponds to the organization short name (e.g. `https://.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](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](https://github.com/Esri/solution.js/assets/17130646/6b0e437d-3977-4f80-b43d-9f74f2000ffd)

![299463913-b72b8491-059a-4882-949c-1ced217086f1](https://github.com/Esri/solution.js/assets/17130646/5d36ebf5-b0c7-483f-8354-42a394d9e5f5)

![299464518-47e93c98-fd65-41e2-83a7-e74f4a5893a2](https://github.com/Esri/solution.js/assets/17130646/6dad0df9-2048-467a-869e-4b12cca10dfd)

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.