-
Notifications
You must be signed in to change notification settings - Fork 15
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
Fix: Automatically propagate user permission updates #3881
Conversation
ec5c492
to
9943e11
Compare
9943e11
to
03a62a6
Compare
03a62a6
to
6696601
Compare
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.
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.
Really nice work on this one @rumzledz 💯
Please note no page has been refreshed while following the testing steps 🫡
Started off only with leela
having permissions
Tried creating a Simple payment
as fry - the error banner is shown
Gave fry
Payer
permissions in General
The error banner was no longer shown on fry
's Simple payment
The Permissions
decision method was available
And back to the error banner for fry
Awesome 🎉
The only reason I'm rejecting this @rumzledz is due to the fact something got wrongly generated for the graphql
types, causing the expenditureId
and expenditureFunding
to be removed from the ColonyMultiSig
, so please try running codegen again 🙌
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.
@rumzledz please try running codegen again, as we shouldn't be removing the expenditureFunding
and expenditureId
for the ColonyMultiSig
model
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.
Apologies for this @mmioana , I'm not sure what happened. I just ran it and it generated these for me 😓 But I shall generate it again 👌
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.
All right pushed! 🚀 @mmioana
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.
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.
Re-approving. Good to go still
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.
Description
Note
Please note that there is an existing issue where the Permissions table on the Completed Action form is not correctly showing the permissions that were removed from the user after a Reputation or Multi-Sig motion has successfully been supported/approved and finalised. This is kind of a complex issue and it will not be addressed on this PR.
There is also an existing issue with reputation motions where the Finalise button has the possibility of getting stuck in a Pending state: #3859. You may or may not come across it but just know that this PR has nothing to do with it.
This PR makes use of subscriptions to automatically refresh member permissions information whenever it's updated.
Out of scope yet relevant and manageable fixes: You should also now be able to see the permissions that are marked for removal on the Completed Action component. BUT please note that this fix is only limited to actions done via Permissions as well as with motions that have not been successfully supported/approved and finalised. Please bear this in mind during testing 🙏
Lastly, I did a wee refactor for setting the user data in our
AppContextProvider
.Testing
Note
Make sure that Fry doesn't not have any permissions to begin with
Important
New stuff ✨
removeObjectFields
which allows you to remove a set of fields from a given object. It's strictly typed so you should be able to see auto-completed fields as you're selecting them:Resolves #3635