Remove require_terms_agreed configuration option
This has been set to true for 6 years in production. Refs #2097 As per other user settings, we set the terms as seen by default for tests, and we can override that when necessary for specific tests.
This commit is contained in:
parent
3795da4014
commit
35a2d66e19
8 changed files with 50 additions and 67 deletions
|
@ -42,7 +42,7 @@ class Ability
|
|||
can [:account, :go_public, :make_friend, :remove_friend, :api_details, :api_gpx_files], User
|
||||
can [:read, :read_one, :update, :update_one, :delete_one], UserPreference
|
||||
|
||||
if user.terms_agreed? || !REQUIRE_TERMS_AGREED
|
||||
if user.terms_agreed?
|
||||
can [:create, :update, :upload, :close, :subscribe, :unsubscribe, :expand_bbox], Changeset
|
||||
can :create, ChangesetComment
|
||||
can [:create, :update, :delete], Node
|
||||
|
@ -57,7 +57,7 @@ class Ability
|
|||
can :destroy, Note
|
||||
can [:new, :create, :edit, :update, :destroy], Redaction
|
||||
can [:new, :edit, :create, :update, :revoke], UserBlock
|
||||
if user.terms_agreed? || !REQUIRE_TERMS_AGREED
|
||||
if user.terms_agreed?
|
||||
can :redact, OldNode
|
||||
can :redact, OldWay
|
||||
can :redact, OldRelation
|
||||
|
|
|
@ -12,7 +12,7 @@ class Capability
|
|||
can [:read, :read_one], UserPreference if capability?(token, :allow_read_prefs)
|
||||
can [:update, :update_one, :delete_one], UserPreference if capability?(token, :allow_write_prefs)
|
||||
|
||||
if token&.user&.terms_agreed? || !REQUIRE_TERMS_AGREED
|
||||
if token&.user&.terms_agreed?
|
||||
can [:create, :update, :upload, :close, :subscribe, :unsubscribe, :expand_bbox], 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)
|
||||
|
@ -23,7 +23,7 @@ class Capability
|
|||
if token&.user&.moderator?
|
||||
can [:destroy, :restore], ChangesetComment if capability?(token, :allow_write_api)
|
||||
can :destroy, Note if capability?(token, :allow_write_notes)
|
||||
if token&.user&.terms_agreed? || !REQUIRE_TERMS_AGREED
|
||||
if token&.user&.terms_agreed?
|
||||
can :redact, OldNode if capability?(token, :allow_write_api)
|
||||
can :redact, OldWay if capability?(token, :allow_write_api)
|
||||
can :redact, OldRelation if capability?(token, :allow_write_api)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue