- if Settings.status != "database_offline"
- can [:index, :new, :create, :show, :edit, :update, :destroy], ClientApplication
- can [:new, :create, :reply, :show, :inbox, :outbox, :mark, :destroy], Message
- can [:close, :reopen], Note
- can [:new, :create], Report
- can [:create, :show, :update, :destroy, :data], Trace
- can [:details, :gpx_files], User
- can [:read, :read_one, :update, :update_one, :delete_one], UserPreference
+ 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")