forked from bofh/fetsite
AutoCommit Son Aug 2 10:03:02 CEST 2015
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
class Comment < ActiveRecord::Base
|
||||
attr_accessible :text,:anonym, :intern, :hidden
|
||||
attr_accessible :text,:anonym, :intern, :hidden, :commentable_id, :commentable_type
|
||||
# commentable depth, official, intern, anonym
|
||||
acts_as_votable
|
||||
acts_as_nested_set :scope => [:commentable_id, :commentable_type]
|
||||
|
||||
Reference in New Issue
Block a user