]> git.openstreetmap.org Git - rails.git/blobdiff - app/abilities/ability.rb
Rework user#set_status and #delete to avoid GET requests
[rails.git] / app / abilities / ability.rb
index c34f357a97a41b2febfbdb7fa1b0a505ded8e3aa..e72b4e85b64d55e6787cca9604c2dca29e0e3c78 100644 (file)
@@ -37,11 +37,12 @@ class Ability
       if Settings.status != "database_offline"
         can [:index, :new, :create, :show, :edit, :update, :destroy], ClientApplication
         can [:new, :create, :edit, :update, :comment, :subscribe, :unsubscribe], DiaryEntry
+        can [:make_friend, :remove_friend], Friendship
         can [:new, :create, :reply, :show, :inbox, :outbox, :mark, :destroy], Message
         can [:close, :reopen], Note
         can [:new, :create], Report
-        can [:mine, :new, :create, :edit, :update, :delete], Trace
-        can [:account, :go_public, :make_friend, :remove_friend], User
+        can [:mine, :new, :create, :edit, :update, :destroy], Trace
+        can [:account, :go_public], User
 
         if user.moderator?
           can [:hide, :hidecomment], DiaryEntry
@@ -55,7 +56,7 @@ class Ability
           can [:hide, :unhide, :hidecomment, :unhidecomment], DiaryEntry
           can [:index, :show, :resolve, :ignore, :reopen], Issue
           can :create, IssueComment
-          can [:set_status, :delete, :index], User
+          can [:set_status, :destroy, :index], User
           can [:grant, :revoke], UserRole
         end
       end