-
Notifications
You must be signed in to change notification settings - Fork 83
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: remove canInviteToGroup
helper on the client
#214
Conversation
Signed-off-by: Erik Kieckhafer <ek@ato.la>
Signed-off-by: Erik Kieckhafer <ek@ato.la>
@mikemurray @willopez see the discussion in #211 as to whether this is the appropriate fix. |
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.
Starting with a fresh db and registering a new user and creating a shop and then I click on the accounts menu item and get this error:
main.js:178 Uncaught TypeError: Cannot read property 'some' of undefined
at roleCheck (main.js:178)
at Object.hasPermission (main.js:216)
at Object.hasAdminAccess (main.js:263)
at hoc.js:91
at tracker.js:40
at Computation._compute (tracker.js:308)
at new Computation (tracker.js:206)
at Object.Tracker.autorun (tracker.js:576)
at tracker.js:38
at Object.Tracker.nonreactive (tracker.js:603)```
@willopez I think that's the same issue you were seeing in this ticket. Does it work if you refresh? If so, lets keep that a separate issue. |
Yes, refreshing it "fixes" the issue. @aldeed was going to look at a way to refresh the user, any updates on this Eric? |
@willopez No but I agree that's a separate issue that should not hold back this PR |
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.
LGTM
Resolves #211
Impact: minor
Type: bugfix
Issue
Issue Description
Solution
Remove the UI / client helper
canInviteToGroup
. This helper was checking permissions in a way we no longer support inv3.0.0
.This solution relies on the API's server side permissions checks to determine if a user has the correct permissions to perform an action. The client can be updated in the future to provide a pre-action warning / error / restriction, if desired.
Breaking changes
Any custom code that uses
Reaction.canInviteToGroup
helper will need to be updated tor remove that helper.Testing
Accounts
page.