forked from hyperstudio/Annotation-Studio
-
Notifications
You must be signed in to change notification settings - Fork 1
Open
Description
@stephskardal helped us clean up the CanCan Ability file.
There were some pieces that were super hard to read, notably in the teacher section.
Annotation-Studio/app/models/ability.rb
Lines 16 to 22 in 65e959c
| cannot :manage, Document do |tors| | |
| if tors.user.nil? # This has been driving me insane. | |
| false | |
| else | |
| tors.user.id == user.id | |
| end | |
| end |
For now, we removed the ugly unreadable code. However, we should probably find out from the upstream project what the intended permissions for teachers is supposed to be.
Metadata
Metadata
Assignees
Labels
No labels