-
-
Notifications
You must be signed in to change notification settings - Fork 7
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Removing partner addresses #2218
Removing partner addresses #2218
Conversation
- must have address - must have a service area - must be root (for now)
If the admin is not root or does not own a partner then check to see if the admin can "see" the partner via service areas. If they cannot then warn the user that clearing the address will stop the admin from being able to access this partner at all.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Unfortunately this is a bit broken. Two things:
-
A partnership or neighbourhood admin should not be allowed to remove an address unless it's in their neighbourhood - this was to stop them taking over control of partners that other users also admin for.
-
once an address has been removed from a partner, it can never be put back! It's also now not possible to create a partner with an address.
See screenshot below:
There's a few other smaller comments about the code I've left, let me know if you have any qs. I think it's possible it might be better for us to leave this now until the next sprint, especially as the permissions surrounding who can do what will become much simpler then, but the foundation work for this is really helpful and we can definitely extend upon this when we get to it!
- admins can see address form even if partner has no address - update to policy governing who can trigger the clear address action - allow only neighbourhood admins to clear an address if that address is in their neighbourhood pool - removed redundant warning text - removed console logging from JS controller
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That looks like the address disappearing problem is fixed which is great but partnership/neighbourhood admins can still remove addresses that don't belong to them, which shouldn't be possible - have left some notes in the code as to why this might be.
Won't try to look up neighbourhood if address is not valid
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
wahey, this works! Looks great, so nice to be able to implement this in this sprint ✨
Closes #2128
There is now a button to clear a partners address on the edit partner form: