- can [:comment, :close, :reopen], Note
- can [:create, :show, :update, :destroy], Trace
- can [:details, :gpx_files], User
- can [:index, :show, :update, :update_all, :destroy], UserPreference
+ can [:create, :comment, :close, :reopen], Note if scopes.include?("write_notes")
+ can [:create, :destroy], NoteSubscription if scopes.include?("write_notes")
+
+ can :read, Trace if scopes.include?("read_gpx")
+ can [:create, :update, :destroy], Trace if scopes.include?("write_gpx")
+
+ can :details, User if scopes.include?("read_prefs")
+ can :read, UserPreference if scopes.include?("read_prefs")
+ can [:update, :update_all, :destroy], UserPreference if scopes.include?("write_prefs")
+
+ can [:read, :update, :destroy], Message if scopes.include?("consume_messages")
+ can :create, Message if scopes.include?("send_messages")
+
+ can :read, :active_user_blocks_list if scopes.include?("read_prefs")