-
Notifications
You must be signed in to change notification settings - Fork 4
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
Cancan port #67
Comments
@Zofz said
I think maybe it would be best if someone with experience of Cancan did the initial port. There are some pitfalls as usual and it's just easier to do if you've done it a few times before. AFAIK that would mean either me, @lham or @henrikssn. It's not fun work, I can do it after my exams meaning next week at the earliest. It would be nice to have some controller test coverage first, so we know that we don't break anything. Everyone can help there. |
The Plan:
|
Also:
|
@henrikssn This is what we have to fix:
|
We also have a lot of |
The cancan way is to check against actions instead of roles. So
instead of
The access rules are all declared in one single place, namely app/models/ability.rb |
👍 |
I managed to get cancan-port running now on dev.fsektionen.se We are currently failing on about 25 tests, we should start fixing that and later write tests for what does not work on the website. See travis for failing tests: https://travis-ci.org/fsek/web/builds/55520580 |
The |
I fixed a lot of We can also start fixing tests as authentication is now working. I.e. for foo to edit a Bar then
You can modify permissions of a post with set_permissions() |
We should also add a Fancy menu showing everything where people have permissions 😄 |
Now I have solved a rather big merge with master. We really need to merge this asap. There are still 4 tests which fail. I will fix them later and then we can merge this. I will need some help adding permissions to all posts. |
Really good work @henrikssn Are the permissions added in the code only? |
Do it. |
@davidwessman Yes, we will need to actually grant the permissions to the posts. There are some (ugly) code added in edit_post to do this. |
Denna är nu live i production, alla spindelmän är nu admins (och jag lade till @jforberg som spindelman). Ni kan hjälpa till att editera permissions under http://fsektionen.se/poster, kilcka på redigera och klicka i relevanta permissions. Lägg upp issues om ni hittar något som folk inte har tillgång till. |
Har inte kollat detta - men det vore toppen om vi kunde styra vilka utskott som folk kan redigera. |
Alla User-permissions bör väl endast vara satta till sig själv - inte kunna sättas på en Post. |
@davidwessman Lätt i cancan. Bara skicka en stänging (block) till can och returnera bool.
|
The port is done and it is working good, ready to close? |
The thread where we discuss the cancan port
The text was updated successfully, but these errors were encountered: