-
Notifications
You must be signed in to change notification settings - Fork 12
Description
We have a page for admins to edit the properties of their organization’s profile. This information will be displayed on the organization’s profile, if it’s public.
This mockup shows how the form will appear to an org admin.
Org admins may freely edit these organization fields:
avatar, using ourAvatarWidgetbiowith information about for the organization.privatecheckbox:- Private is false by default.
- If the organization is public and in a hidden state (following proposal in [User and organization privacy](https://www.notion.so/User-and-organization-privacy-279f889269638051ac3ece39faf69e7d?pvs=21)), show a message explaining that they will not appear publicly until the org is verified or has made a payment.
Org admins should be able to request changes to the following data:
name- The
slugused to identify the organization in URLs.- Like with individual profiles, slugs may be changed once before editing them is disabled. If an org admin would like to change their slug again, they need to contact support with a change request.
- When we can’t find an org matching a slug, we can query the table of approved change requests to find an older slug that matches.
- Since changing a slug will break existing URLs to the organization’s pages in Accounts, we will handle broken links by showing signed-in users a list of their orgs on any organization 404 pages.
url- Location
When requesting a change, we’ll also want to prompt users for an explanation of their changes. After the user clicks the “Request changes” button, we can raise a prompt to captures this explanation before continuing with the submission.
When a staff member saves the form, we don’t need an explanation and don’t need to issue a change request. For staff members, the button should read “Save Changes”.
Tracking change requests
We require staff confirmation for names and URLs to prevent impersonations. When changes are requested, we will create a new support ticket with a link to the organization’s profile.
Each change to an organization’s profile data should be recorded in a new table, OrganizationProfileChangeRequests. The model should include fields for:
- a unique
id - the
userwho made the request - a relation to the
organization - an
explanationfor the change - a
statusfor the change (one of:pending,accepted,rejected) - “previous” data, pulled from the organization during creation:
old_display_nameold_slugold_urlold_location
- the “changed” data, possibly null if not different from previous data:
new_display_namenew_slugnew_urlnew_location
When a change request is created, we will also create a support ticket with Zenpy and the ZenDesk API. See the muckrock repo for a reference implementation using the Zenpy library. This will allow staff to respond to the user to discuss their request.
The support request can look something like:
<user.name> requested the following changes to their organization <organization.name>:
- Display Name: New Yor Times -> New York Times
- Slug: new-yor-times -> new-york-times
They provided the following explanation:
> We had a typo in our org name.
To approve this change, please follow this link:
https://accounts.muckrock.com/organization/<slug>/change-request/<id>
Staff will have permission to make the edit on this page, so they can make any adjustments they need to before “Confirming” the changes by saving the form.
When the form is saved, the changed data should be applied to the Organization.
