fdanard
(Franck Danard)
2021 年 6 月 17 日午前 8:42
1
Hi Everyone.
I’m newbe on Discourse, and I must to change something in Login page but I don’t know where is the target and is content.
The URL looks like this: my.domain.com/auth/crowd and I get a Login page but I’m not able to edit its content.
I saw something in the discourse conf file (crowd_custom_html ) but the content is not really the same as displayed on the page.
I wonder where I can change this content.
Also, I checked if there were any redirection on /auth/crowd , Nothing (I guess).
Is someone can help me please?
Thanks
Franck
Your discourse is probably using Atlassian Crowd for sso
You should check the crowd documentation for any changes to your login page.
「いいね!」 2
fdanard
(Franck Danard)
2021 年 11 月 30 日午前 10:31
4
さらにコードを調べたところ(私はRubyを知りません)、HTMLコンテンツをブロックしているものがあるようです。
else
OmniAuth.config.form_css << GlobalSetting.crowd_custom_css
end
end
OmniAuth::Form.build(title: (GlobalSetting.try(:crowd_popup_title) || GlobalSetting.try(:crowd_title) || "Crowd Authentication")) do
text_field 'Username', 'username'
password_field 'Password', 'password'
html "\n<input type='hidden' name='authenticity_token' value='#{token}'/>" if token
button 'Login'
if GlobalSetting.respond_to?(:crowd_custom_html)
html GlobalSetting.crowd_custom_html
end
end.to_response
end
end
omniauth.provider :crowd,
name: 'crowd',
crowd_server_url: GlobalSetting.try(:crowd_server_url),
application_name: GlobalSetting.try(:crowd_application_name),
application_password: GlobalSetting.try(:crowd_application_password)
ここにコンテンツを表示するDISCOURSE_CROWD_CUSTOM_HTMLを設定することが原因だと想像していますか?
「いいね!」 1
david
(David Taylor)
2021 年 11 月 30 日午後 1:50
5
はい、それでうまくいくはずです。app.yml ファイル内で DISCOURSE_CROWD_CUSTOM_HTML 環境変数を設定する必要があります。
fdanard
(Franck Danard)
2021 年 11 月 30 日午後 1:52
6
残念ながら、うまくいきません。
コンテンツを引用符で囲む必要があるのかもしれません。
今のところ、コンテンツは引用符で囲まれていません。
david
(David Taylor)
2021 年 11 月 30 日午後 3:17
7
はい、ローカルで試してみたところ、引用符を含む GlobalSetting の値(カスタム HTML にはほぼ常に引用符が含まれます)の解析に問題があるようです。この回避策をプッシュしました。
committed 03:11PM - 30 Nov 21 UTC
The discourse.conf file doesn't handle strings with single quotes in them. There… fore we can't use the GlobalSetting interface, and need to reach directly for the ENV.
Not ideal, and can possibly be improved in future updates of 'launcher', and the discourse.conf file. For now, this commit will solve the issue for this plugin.
サイトを更新すれば、以前よりずっとうまく機能するはずです。以下は、現在私にとってうまく機能する値の例です。
DISCOURSE_CROWD_CUSTOM_HTML: "<a href='https://example.com' style='display: block; margin: 0.5em 0; text-align: center'>Sign up for an example.com account!</a><a style='display: block; text-align: center' href='https://example.com/forgot_password'>Forgot Password</a>"
fdanard
(Franck Danard)
2021 年 11 月 30 日午後 3:21
8
ありがとうございます、デイビッド。
明日ウェブサイトを更新します。
今すぐ行ってください。良い時間ではありません。
GUIからウェブサイトを更新できますか?
お知らせします。
「いいね!」 1
david
(David Taylor)
2021 年 11 月 30 日午後 3:25
9
fdanard:
GUIからウェブサイトを更新できますか?
app.yml の値を変更しないのであれば、/admin/upgrade から discourse-crowd プラグインをアップグレードできるはずです。
david
(David Taylor)
2021 年 11 月 30 日午後 3:28
11
いつものアップデートと同じです。アップデートの実行中は数秒から数分間、ダウンタイムや遅延が発生する可能性があります。可能であれば、サイトの利用者が少ない時間帯に実施することをお勧めします。
fdanard
(Franck Danard)
2021 年 11 月 30 日午後 3:30
12
承知いたしました。
ありがとうございました。またご連絡します
「いいね!」 1
fdanard
(Franck Danard)
2021 年 11 月 30 日午後 3:45
13
@david ちょっと質問があります。
crowd_popup_title と crowd_title があるのを見ました。
両者の違いは、前者はポップアップで表示され、後者はフルページで表示される、ということで合っていますか?
david
(David Taylor)
2021 年 11 月 30 日午後 3:51
14
「popup」という単語は少し時代遅れです。認証にポップアップはもう使用しないため、その値は実際には認証中のタブの<title>として使用されます。
(つまり、この部分です:)
crowd_titleは、ログインボタンのラベルとして使用されます(複数のログイン方法が有効になっている場合)。
crowd_popup_titleを指定しない場合、crowd_titleがログインタブの<title>に使用されます。
fdanard
(Franck Danard)
2021 年 11 月 30 日午後 3:55
15
なるほど、わかりました。
アップデート後、ログイン用のポップアップがなくなったからです。現在、ログイン用のフルページがあります。
ところで、このページをカスタマイズする方法はありますか?例えば、背景など…?
「いいね!」 1
david
(David Taylor)
2021 年 11 月 30 日午後 4:35
16
はい、DISCOURSE_CROWD_CUSTOM_CSS を使用して、ページにカスタム CSS ルールを追加できます。
「いいね!」 1
system
(system)
クローズされました:
2021 年 12 月 31 日午前 8:04
18
This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.