Project

General

Profile

Actions

QA #282

open

ログインIDにスペース等を含めたい場合がある

Added by 奈良 裕記 over 6 years ago. Updated about 2 years ago.

Status:
回答済
Priority:
通常
Assignee:
-
Category:
-
Target version:
Start date:
01/08/2017
Due date:
% Done:

0%

Estimated time:
Spent time:

Description

■現象/要望

ログインIDにスペースを追加したい。
ADでは設定できる。
http://www.redmine.org/issues/811 Username validation - allow spaces...

■解決策

app/models/user.rbのvalidation指定を変更すれば対応できる、

変更前

validates_format_of :login, :with => /^[a-z0-9_\-@\.]*$/i

変更後(0-9の直後にスペース有)

validates_format_of :login, :with => /^[a-z0-9 _\-@\.]*$/i

独語でumlauts も必要な場合

validates_format_of :login, :with => /^[a-z0-9_ äüöéßÄÜÖ\-@\.]*$/iu

■対応状況

ソースパッチで対応可

■補足

文化の差異というか、、

http://www.redmine.org/issues/811 Username validation - allow spaces...
http://www.redmine.org/issues/6166 Support german umlauts and whitespaces in login string
http://www.redmine.org/issues/10810 Allow Login IDs with spaces in them

WindowsのログインIDに全角文字を使ったことが原因のトラブルを見た事はあります。
余計なトラブル起こしたくないので、共通の半角英数以外はIDに使うべきではないと思いますが。

Actions #1

Updated by 奈良 裕記 over 6 years ago

  • Description updated (diff)
  • Status changed from 新規 to 回答済
Actions #2

Updated by 博司 西山 about 6 years ago

早速教えて頂き、ありがとうございます。
私もこのような空白入りのアカウントは使用すべきでは無いと思っていますが、私本人の意向では決められないもので、非常に助かります。
数名ならともかく、社内で多数のアカウントを管理しなければならないため、LDAP認証が使えるので大変助かりました。

Actions #3

Updated by 奈良 裕記 about 6 years ago

お役に立てれば幸いです。
現行環境の制約があるのは仕方ないですね。

実際に運用された上で注意すべき点などありましたら教えてください。

あと、11回勉強会の下記LT講演内容も参考になると思います。

「開発環境の認証を改善して Redmineを社内標準にした話」
https://www.slideshare.net/ryousoda/redmine-69559249

Actions #4

Updated by 奈良 裕記 over 3 years ago

  • Description updated (diff)
Actions #5

Updated by 奈良 裕記 about 2 years ago

  • Description updated (diff)
Actions

Also available in: Atom PDF