scaffoldsgesäubert
This commit is contained in:
@@ -13,6 +13,8 @@ class Ability
|
||||
can :read, Modulgruppe
|
||||
if user.has_role? "newsadmin"
|
||||
can :manage, Modulgruppe
|
||||
can :addmoderator, Modulgruppe
|
||||
can :addmoderator, Rubrik
|
||||
end
|
||||
# The first argument to `can` is the action you are giving the user permission to do.
|
||||
# If you pass :manage it will apply to every action. Other common actions here are
|
||||
|
||||
@@ -1,7 +1,12 @@
|
||||
class Rubrik < ActiveRecord::Base
|
||||
attr_accessible :desc, :name, :prio
|
||||
has_many :neuigkeiten
|
||||
resourcify
|
||||
def moderator
|
||||
u=User.with_role(:newsmoderator).first
|
||||
if !u.nil?
|
||||
u.id
|
||||
end
|
||||
end
|
||||
|
||||
def moderator=(id)
|
||||
|
||||
Reference in New Issue
Block a user