Closed richardolsson closed 3 months ago
Maybe @yusf can suggest a design for such a banner? Or a completely different solution if you want?
Ah yes, this will need a general read-only type of designed solution as we should expect this situation to emerge repeatedly as we expand on features of sharing content across orgs.
Finally a stab at this issue!
This survey is owned by ORG_TITLE and is not editable.
This survey is owned by ORG_TITLE and is editable only from its original location.
Go to original
Same as above but a different banner message and action.
@sefsh The last image ("Edit privilege") looks identical to the previous one to me. Is it a copy-paste mistake?
Description
When a survey is inherited to a sub-organization, admins of that sub-organization should only be allowed to see the submissions, not edit the survey in any way. But navigating to such a survey today (and even more relevantly, after a fix to #1721) leads to a normal survey page where things seem like they're editable, but editing them as a sub-org admin will (correctly) be prevented by the API and raise errors.
Steps to reproduce
Expected Behaviour
The title should be read-only, because you are acting within an organization that does not own this survey.
Actual Behaviour
The title can be edited. If you had been logged in as a sub-org admin, editing it would also throw an error, but that's secondary, because the interface should not present as editable in the first place.
Screenshots (if you have any)
Proposed solutions
When visiting an inherited survey, disable all editable fields. Present a banner somewhere saying something along the lines of "This survey is owned by ORG TITLE so you can't edit it" if the user is not an admin in the parent org, or "This survey is owned by ORG_TITLE. Go to LINK to edit it" if the user is an admin in the parent org.
Editable fields that need to be disabled include: