]> git.openstreetmap.org Git - rails.git/blobdiff - app/abilities/ability.rb
Merge remote-tracking branch 'upstream/pull/5753'
[rails.git] / app / abilities / ability.rb
index e31e3e930cc8ed60368b85c94fc73318756491a7..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
@@ -22,28 +22,29 @@ class Ability
       can [:create, :update], :password
       can :read, Redaction
       can [:create, :destroy], :session
-      can [:read, :data, :georss], Trace
+      can [:read, :data], Trace
       can [:read, :create, :suspended, :auth_success, :auth_failure], User
       can :read, UserBlock
     end
 
     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 [:subscribe, :unsubscribe], Changeset
+        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, :mark, :unmute, :destroy], Message
+        can [:read, :create, :destroy], Message
         can [:close, :reopen], Note
         can [:read, :update], :preference
         can :update, :profile