X-Git-Url: https://git.openstreetmap.org./rails.git/blobdiff_plain/ac01ada27496434ff20394278faafb3a0277eb8d..f0e76d90add15e8bec6a4350f69f2a06f168574b:/app/abilities/api_ability.rb?ds=sidebyside diff --git a/app/abilities/api_ability.rb b/app/abilities/api_ability.rb index 8ee280b3a..e20b849d1 100644 --- a/app/abilities/api_ability.rb +++ b/app/abilities/api_ability.rb @@ -29,20 +29,14 @@ class ApiAbility if user.terms_agreed? can [:create, :update, :upload, :close, :subscribe, :unsubscribe], Changeset can :create, ChangesetComment - can [:create, :update, :delete], Node - can [:create, :update, :delete], Way - can [:create, :update, :delete], Relation + can [:create, :update, :delete], [Node, Way, Relation] end if user.moderator? can [:destroy, :restore], ChangesetComment can :destroy, Note - if user.terms_agreed? - can :redact, OldNode - can :redact, OldWay - can :redact, OldRelation - end + can :redact, [OldNode, OldWay, OldRelation] if user.terms_agreed? end end end