Merge branch 'next-minor' into develop
This commit is contained in:
commit
4c46ca1a94
5 changed files with 11 additions and 12 deletions
|
|
@ -41,12 +41,14 @@ Although the chat was never enabled per default and was marked as experimental,
|
|||
## Refactor
|
||||
* Cache local posts/comments count for statistics [#8241](https://github.com/diaspora/diaspora/pull/8241)
|
||||
* Fix html-syntax in some handlebars templates [#8251](https://github.com/diaspora/diaspora/pull/8251)
|
||||
* Remove `chat_enabled` flag from archive export [#8265](https://github.com/diaspora/diaspora/pull/8265)
|
||||
|
||||
## Bug fixes
|
||||
|
||||
## Features
|
||||
* Add tags to tumblr posts [#8244](https://github.com/diaspora/diaspora/pull/8244)
|
||||
* Add blocks to the archive export [#8263](https://github.com/diaspora/diaspora/pull/8263)
|
||||
* Allow points and dashes in the username [#8266](https://github.com/diaspora/diaspora/pull/8266)
|
||||
|
||||
# 0.7.15.0
|
||||
|
||||
|
|
|
|||
|
|
@ -36,10 +36,8 @@ class User < ApplicationRecord
|
|||
before_validation :set_current_language, :on => :create
|
||||
before_validation :set_default_color_theme, on: :create
|
||||
|
||||
validates :username, :presence => true, :uniqueness => true
|
||||
validates_format_of :username, :with => /\A[A-Za-z0-9_]+\z/
|
||||
validates_length_of :username, :maximum => 32
|
||||
validates_exclusion_of :username, :in => AppConfig.settings.username_blacklist
|
||||
validates :username, presence: true, uniqueness: true, format: {with: /\A[A-Za-z0-9_.\-]+\z/},
|
||||
length: {maximum: 32}, exclusion: {in: AppConfig.settings.username_blacklist}
|
||||
validates_inclusion_of :language, :in => AVAILABLE_LANGUAGE_CODES
|
||||
validates :color_theme, inclusion: {in: AVAILABLE_COLOR_THEMES}, allow_blank: true
|
||||
validates_format_of :unconfirmed_email, :with => Devise.email_regexp, :allow_blank => true
|
||||
|
|
|
|||
|
|
@ -32,7 +32,7 @@
|
|||
placeholder: t("registrations.new.username"),
|
||||
title: t("registrations.new.enter_username"),
|
||||
required: true,
|
||||
pattern: "[A-Za-z0-9_]+",
|
||||
pattern: "[A-Za-z0-9_.\-]+",
|
||||
aria: {labelledby: "usernameLabel"}
|
||||
|
||||
- if mobile
|
||||
|
|
|
|||
|
|
@ -186,7 +186,11 @@ Rails.application.routes.draw do
|
|||
post 'by_handle' => :retrieve_remote, :as => 'person_by_handle'
|
||||
end
|
||||
end
|
||||
get '/u/:username' => 'people#show', :as => 'user_profile', :constraints => { :username => /[^\/]+/ }
|
||||
|
||||
# Note: The contraint for this route's username parameter cannot be removed.
|
||||
# This constraint turns off the format parameter, so that an username
|
||||
# doctor.example would not try to render the user `doctor` in `example` format.
|
||||
get "/u/:username" => "people#show", :as => "user_profile", :constraints => {username: %r{[^/]+}}
|
||||
|
||||
# External
|
||||
|
||||
|
|
@ -209,7 +213,7 @@ Rails.application.routes.draw do
|
|||
get 'help/:topic' => 'help#faq'
|
||||
|
||||
#Protocol Url
|
||||
get "protocol" => redirect("https://wiki.diasporafoundation.org/Federation_Protocol_Overview")
|
||||
get "protocol" => redirect("https://diaspora.github.io/diaspora_federation/")
|
||||
|
||||
# NodeInfo
|
||||
get ".well-known/nodeinfo", to: "node_info#jrd"
|
||||
|
|
|
|||
|
|
@ -261,11 +261,6 @@ describe User, type: :model do
|
|||
expect(alice).not_to be_valid
|
||||
end
|
||||
|
||||
it "should not contain periods" do
|
||||
alice.username = "kittens."
|
||||
expect(alice).not_to be_valid
|
||||
end
|
||||
|
||||
it "can be 32 characters long" do
|
||||
alice.username = "hexagoooooooooooooooooooooooooon"
|
||||
expect(alice).to be_valid
|
||||
|
|
|
|||
Loading…
Reference in a new issue