AutoCommit Son Aug 2 10:03:02 CEST 2015

This commit is contained in:
Andreas Stephanides
2015-08-02 10:03:02 +02:00
parent f71171f509
commit 15b70ad8c6
8 changed files with 29 additions and 27 deletions

View File

@@ -10,8 +10,24 @@ class Ability
end
end
user ||= User.new # guest user (not logged in)
can :manage, Survey::Question
can :manage, Comment
can :manage, Survey::Choice
can :manage, Survey::Answer
#---------------------------------------------------
can :index, Comment
can :show, Comment
if loggedin
can [:create,:new], Comment
end
# can :manage, Comment
unless user.has_role?("fetadmin")
cannot :delete, Comment
cannot :destroy, Comment
end
#-----------------------------------------------------
# Rechteverwaltung fuer Studien Modul
can [:show, :index], Studium, :visible=>true