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
Add ownership to channels and associated enhancements #223
Conversation
…nly administrators may delete channels. (refs kandanapp#131, kandanapp#154)
…estroyable flage.
…able channels (non-primary, owned, or all except primary channel if you're an admin).
I would appreciate some comments especially on that last commit 👮 |
Overall this looks good. I have to pull it down and test it. 👍 for using CanCan |
This is pretty much how I envisioned it working. It's a good first start but over time will need improvements. Ie channels will eventually need to have the concept of private vs public etc. Thoughts? |
Also to note is that I won't be able to test until tomorrow |
Latest commits:
@fusion94: Yup, this is definitely just a starting point and will need improvements - was initially focussing on fixing #131 before considering branching out into more fine-grained control of channels (which will need UI improvements for modifying, creating etc.). |
Ok so I installed this locally and ran into issues.
Here's a gist of the full output: https://gist.github.com/fusion94/5195247 Once I start up the server I see this almost immediately:
Here's a gist of the full output: https://gist.github.com/fusion94/5195255 Now once I logon I get this: So has something changed? Is your PR missing something? |
This is probably because I didn't update the |
@mjtko right on, just let us know what you find out. |
…alidate correctly; ensure the primary channel is assigned to the primary user.
Ok, that should fix it I reckon. |
Add ownership to channels and associated enhancements
Hmm, no idea wtf travis is on about this time. Is our/their ruby 2.0 test environment borked? |
I think their's might be as it works for me in ruby 2.0 |
Add ownership to channels and associated enhancements
This is a bit of a big one, so I want to get it open for discussion.
This PR fixes both #131 and #154 by introducing Cancan to manage authorization. Channels are now owned by a user. A user may only delete a channel they own, unless they are an admin. Nobody may delete channel id=1.
As always, feedback/questions welcomed! 😺