rails CanCan: Letting users set-up certain permissions themselves (photo gallery use case)
I'm developing a photo gallery with Rails, wher开发者_如何学JAVAe the "owners" of a photo set should be able to set permissions themselves (i.e.: allow certain users or groups to do certain actions with the photo set).
Right now I made my first steps with Devise and CanCan an can set static permissions via CanCan's Ability class.
Does anyone have an idea on how to make this more dynamically so that I can achieve my goal?
Thanks in advance
Ok, I answer myself :) I think, that's the way to go: https://github.com/ryanb/cancan/wiki/Abilities-in-Database
精彩评论