]> git.openstreetmap.org Git - rails.git/blobdiff - app/abilities/ability.rb
Allow admins to unhide diary comments, if they wish
[rails.git] / app / abilities / ability.rb
index d2864e452ab975c06ba98c4d2b6ac221f67ee693..28380392df1aaaba9500b1724e047e8c71f70826 100644 (file)
@@ -36,7 +36,7 @@ class Ability
 
       if Settings.status != "database_offline"
         can [:index, :new, :create, :show, :edit, :update, :destroy], ClientApplication
-        can [:create, :edit, :comment, :subscribe, :unsubscribe], DiaryEntry
+        can [:new, :create, :edit, :update, :comment, :subscribe, :unsubscribe], DiaryEntry
         can [:new, :create, :reply, :show, :inbox, :outbox, :mark, :destroy], Message
         can [:close, :reopen], Note
         can [:new, :create], Report
@@ -51,7 +51,7 @@ class Ability
         end
 
         if user.administrator?
-          can [:hide, :hidecomment], [DiaryEntry, DiaryComment]
+          can [:hide, :unhide, :hidecomment, :unhidecomment], [DiaryEntry, DiaryComment]
           can [:index, :show, :resolve, :ignore, :reopen], Issue
           can :create, IssueComment
           can [:set_status, :delete, :index], User