Skip to content
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

Having issues with create/update #21

Closed
GRardB opened this issue May 14, 2016 · 3 comments
Closed

Having issues with create/update #21

GRardB opened this issue May 14, 2016 · 3 comments

Comments

@GRardB
Copy link

GRardB commented May 14, 2016

Finally got around to checking this gem as per @valscion's suggestion!

I'm using Ember.js, and I'm having some issues with my create/update calls. An example of a model relationship I have is:

Expense belongs to a User
Expense belongs to a Category

When I try to create or update an Expense, I get a an error saying that I don't have permission to update a Category (which I shouldn't). If I make the Category update-able by every user, I then get an error saying that I'm unable to update the user (I should, but technically I haven't implemented that part yet).

I'm confused as to why I'd need to set up permissions for these models since I'm not updating them in any way. I'm especially concerned with Category's permissions, given that I definitely don't want every user to be able to update that model. Any ideas?

Thanks!

@GRardB
Copy link
Author

GRardB commented May 14, 2016

Another similar issue I'm running into:

Group belongs to User (owner)
Group belongs to User (member)
Group has many Invitations

Invitation belongs to User (member)
Invitation belongs to Group

When I try to accept an invitation as a member, I get an error saying this User doesn't have permissions to update the Group (because the member is not the owner). However, I don't see why the member would need permissions to update the Group in order to update an Invitation.

@GRardB GRardB closed this as completed May 14, 2016
@GRardB
Copy link
Author

GRardB commented May 14, 2016

Just realized this is a duplicate. Sorry!

@valscion
Copy link
Member

valscion commented Aug 7, 2016

Please see #30 for a possible solution to this problem. Any input in there is greatly appreciated!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

2 participants