Add abilities to documentable authors and admins to create and destroy documents.

This commit is contained in:
Senén Rodero Rodríguez
2017-07-21 11:55:15 +02:00
parent 34d06dad04
commit c92827e89e
4 changed files with 36 additions and 0 deletions

View File

@@ -36,6 +36,8 @@ module Abilities
can [:create, :destroy], Follow
can [:create, :destroy], Document, documentable: { author_id: user.id }
unless user.organization?
can :vote, Debate
can :vote, Comment