Esri / solutions-erg-widget

The Emergency Response Guide (ERG) widget allows users to determine potential hazards based on the type of chemical spill and user-selected location on the map.
Apache License 2.0
6 stars 4 forks source link

Publish functionality should have more verbose error messaging and have steps of validation changed #81

Closed adgiles closed 6 years ago

adgiles commented 6 years ago

Same issue as for GRG publishing: https://github.com/Esri/solutions-grg-widget/issues/175

When publishing if a user with access to an org, but not access to publish tries to create something, they get a generic message of "Create Service: Unable to create service". We should improve this message to tell them "Create Service: Unable to create service because user does not have permissions." Additionally we should change the workflow of validating the user's permissions. If a user with access to the org but not permissions to publish tries to create an item, using the name of an existing hosted feature service, it tells the user that they cannot publish because that name is not unique. This can be confusing for the user because it gives a false sense of what the problem is... true it cannot publish because the name is unique, but ultimately even if they then make the name unique, they still cannot publish because they do not have permissions, we should do the permissions check first, so they understand right away, that they cannot publish at all because they do not have permissions.

In short, the issue is:

adgiles commented 6 years ago

@topowright

Addressed in PR #82

Added a user permissions check before the layer name available check. If the user does not have publisher rights the following error message is displayed:

'Create Service: Unable to create service because user does not have permissions'