X-Git-Url: https://git.openstreetmap.org./rails.git/blobdiff_plain/fc8923c3059dd5fb603c84cbd0dde9c039b0eb44..fa7ba58d5e22040f5e0d6c171bcceb59b58145ad:/app/abilities/api_capability.rb?ds=inline 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)