can [:create, :destroy], :session
can [:read, :data, :georss], Trace
can [:read, :create, :suspended, :auth_success, :auth_failure], User
- can [:read, :update], :account_terms
can :read, UserBlock
end
if user&.active?
can :welcome, :site
- can :read, :deletion
+ can :read, [:deletion, :account_terms]
if Settings.status != "database_offline"
can [:subscribe, :unsubscribe], Changeset
can [:read, :destroy], :oauth2_authorized_application
can [:read, :create, :destroy], :oauth2_authorization
can [:update, :destroy], :account
+ can :update, :account_terms
can :read, :dashboard
can [:create, :subscribe, :unsubscribe], DiaryEntry
can :update, DiaryEntry, :user => user
else
@title = t ".title"
- if current_user&.terms_agreed?
+ if current_user.terms_agreed?
# Already agreed to terms, so just show settings
redirect_to edit_account_path
- elsif current_user.nil?
- redirect_to login_path(:referer => request.fullpath)
end
end
end
def update
- @title = t "users.new.title"
-
if params[:decline] || !(params[:read_tou] && params[:read_ct])
- if current_user
- current_user.terms_seen = true
-
- flash[:notice] = { :partial => "accounts/terms/terms_declined_flash" } if current_user.save
-
- referer = safe_referer(params[:referer]) if params[:referer]
+ current_user.terms_seen = true
- redirect_to referer || edit_account_path
- elsif params[:decline]
- redirect_to t("users.terms.declined"), :allow_other_host => true
- else
- redirect_to account_terms_path
- end
- elsif current_user
+ flash[:notice] = { :partial => "accounts/terms/terms_declined_flash" } if current_user.save
+ else
unless current_user.terms_agreed?
current_user.consider_pd = params[:user][:consider_pd]
current_user.tou_agreed = Time.now.utc
current_user.terms_agreed = Time.now.utc
current_user.terms_seen = true
- flash[:notice] = t "users.new.terms accepted" if current_user.save
+ flash[:notice] = t ".terms accepted" if current_user.save
end
+ end
- referer = safe_referer(params[:referer]) if params[:referer]
+ referer = safe_referer(params[:referer]) if params[:referer]
- redirect_to referer || edit_account_path
- end
+ redirect_to referer || edit_account_path
end
end
end
readable_summary: human readable summary
informal_translations: informal translations
continue: "Continue"
- declined: "https://wiki.openstreetmap.org/wiki/Contributor_Terms_Declined"
cancel: "Cancel"
you need to accept or decline: "Please read and then either accept or decline the new Contributor Terms to continue."
legale_select: "Country of residence:"
france: "France"
italy: "Italy"
rest_of_world: "Rest of the world"
+ update:
+ terms accepted: "Thanks for accepting the new contributor terms!"
terms_declined_flash:
terms_declined_html: We are sorry that you have decided to not accept the new Contributor Terms. For more information, please see %{terms_declined_link}.
terms_declined_link: this wiki page
contributor_terms_url: "https://osmfoundation.org/wiki/Licence/Contributor_Terms"
contributor_terms: "contributor terms"
continue: Sign Up
- terms accepted: "Thanks for accepting the new contributor terms!"
email_help:
privacy_policy: privacy policy
privacy_policy_url: https://osmfoundation.org/wiki/Privacy_Policy