]> git.openstreetmap.org Git - rails.git/blobdiff - app/abilities/ability.rb
Move close button out of right sidebar content
[rails.git] / app / abilities / ability.rb
index 262e92c26df4793fac47ce2a209d94c1b63d4f64..bd3ea28bb1e18f151ef593b1c854a4771021f9f0 100644 (file)
@@ -4,7 +4,7 @@ class Ability
   include CanCan::Ability
 
   def initialize(user)
-    can :query, :browse
+    can :read, :feature_query
     can :read, [Node, Way, Relation, OldNode, OldWay, OldRelation]
     can [:show, :create], Note
     can :search, :direction
@@ -29,21 +29,22 @@ class Ability
 
     if user&.active?
       can :welcome, :site
-      can :read, [:deletion, :account_terms]
+      can :read, [:deletion, :account_terms, :account_pd_declaration, :account_home]
 
       if Settings.status != "database_offline"
         can [:read, :create, :destroy], :changeset_subscription
         can [:read, :create, :update, :destroy], :oauth2_application
         can [:read, :destroy], :oauth2_authorized_application
         can [:read, :create, :destroy], :oauth2_authorization
-        can [:update, :destroy], :account
+        can [:read, :update, :destroy], :account
         can :update, :account_terms
+        can :create, :account_pd_declaration
         can :read, :dashboard
         can [:create, :subscribe, :unsubscribe], DiaryEntry
         can :update, DiaryEntry, :user => user
         can [:create], DiaryComment
         can [:show, :create, :destroy], Follow
-        can [:read, :create, :unmute, :destroy], Message
+        can [:read, :create, :destroy], Message
         can [:close, :reopen], Note
         can [:read, :update], :preference
         can :update, :profile