X-Git-Url: https://git.openstreetmap.org./rails.git/blobdiff_plain/5444af981c8c3161ed7991d0fb0fd7463175fc7e..c8e21c409c9bec446f0caa2526d5b07861bb3299:/app/abilities/api_capability.rb?ds=sidebyside diff --git a/app/abilities/api_capability.rb b/app/abilities/api_capability.rb index c3544136b..beb4d39bf 100644 --- a/app/abilities/api_capability.rb +++ b/app/abilities/api_capability.rb @@ -8,13 +8,13 @@ class ApiCapability can [:create, :comment, :close, :reopen], Note if capability?(token, :allow_write_notes) can [:show, :data], Trace if capability?(token, :allow_read_gpx) can [:create, :update, :destroy], Trace if capability?(token, :allow_write_gpx) - can [:api_details], User if capability?(token, :allow_read_prefs) - can [:api_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 [:details], User if capability?(token, :allow_read_prefs) + can [:gpx_files], User if capability?(token, :allow_read_gpx) + 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, :expand_bbox], Changeset if capability?(token, :allow_write_api) + can [:create, :update, :upload, :close, :subscribe, :unsubscribe], Changeset if capability?(token, :allow_write_api) can :create, ChangesetComment if capability?(token, :allow_write_api) can [:create, :update, :delete], Node if capability?(token, :allow_write_api) can [:create, :update, :delete], Way if capability?(token, :allow_write_api)