X-Git-Url: https://git.openstreetmap.org./rails.git/blobdiff_plain/fc8923c3059dd5fb603c84cbd0dde9c039b0eb44..61c3d97a8ad2891bef0a2eeaa0d60e625b6c2ef2:/app/abilities/api_capability.rb diff --git a/app/abilities/api_capability.rb b/app/abilities/api_capability.rb index a4ca25204..beb4d39bf 100644 --- a/app/abilities/api_capability.rb +++ b/app/abilities/api_capability.rb @@ -10,8 +10,8 @@ class ApiCapability can [:create, :update, :destroy], Trace if capability?(token, :allow_write_gpx) can [:details], User if capability?(token, :allow_read_prefs) can [:gpx_files], User if capability?(token, :allow_read_gpx) - can [:read, :read_one], UserPreference if capability?(token, :allow_read_prefs) - can [:update, :update_one, :delete_one], UserPreference if capability?(token, :allow_write_prefs) + can [:index, :show], UserPreference if capability?(token, :allow_read_prefs) + can [:update, :update_all, :destroy], UserPreference if capability?(token, :allow_write_prefs) if token&.user&.terms_agreed? can [:create, :update, :upload, :close, :subscribe, :unsubscribe], Changeset if capability?(token, :allow_write_api)