fdanard
(Franck Danard)
17 يونيو 2021، 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)
30 نوفمبر 2021، 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)
30 نوفمبر 2021، 1:50م
5
نعم، يجب أن يعمل ذلك - يجب عليك تكوين متغير البيئة DISCOURSE_CROWD_CUSTOM_HTML داخل ملف app.yml الخاص بك.
fdanard
(Franck Danard)
30 نوفمبر 2021، 1:52م
6
للأسف، لم ينجح الأمر.
ربما يجب أن يكون المحتوى محاطًا بعلامات اقتباس؟
في الوقت الحالي، المحتوى غير محاط بعلامات اقتباس.
david
(David Taylor)
30 نوفمبر 2021، 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>قم بالتسجيل للحصول على حساب example.com!</a><a>نسيت كلمة المرور</a>"
fdanard
(Franck Danard)
30 نوفمبر 2021، 3:21م
8
شكرا جزيلا ديفيد.
سأقوم بتحديث الموقع غدا.
افعل ذلك الآن، ليس الوقت المناسب.
هل يمكنني تحديث الموقع من خلال واجهة المستخدم الرسومية؟
سأعلمك.
إعجاب واحد (1)
david
(David Taylor)
30 نوفمبر 2021، 3:25م
9
إذا لم تكن تغير القيمة في app.yml، فيمكنك ترقية المكون الإضافي discourse-crowd عبر /admin/upgrade.
david
(David Taylor)
30 نوفمبر 2021، 3:28م
11
سيكون الأمر تمامًا مثل أي تحديث آخر - قد يكون هناك بضع ثوانٍ/دقائق من التعطل/البطء أثناء تشغيل التحديث. من الأفضل الانتظار حتى وقت هدوء موقعك إن أمكن.
fdanard
(Franck Danard)
30 نوفمبر 2021، 3:30م
12
حسناً فهمت.
شكراً جزيلاً. سأعلمك
إعجاب واحد (1)
fdanard
(Franck Danard)
30 نوفمبر 2021، 3:45م
13
@david سؤال سريع من فضلك.
لقد رأيت أن هناك crowd_popup_title و crowd_title .
الفرق بينهما هو أن الأول يُعرض في نافذة منبثقة، والثاني في صفحة كاملة، صحيح؟
david
(David Taylor)
30 نوفمبر 2021، 3:51م
14
كلمة ‘popup’ قديمة بعض الشيء. لم نعد نستخدم النوافذ المنبثقة للمصادقة، لذا تُستخدم هذه القيمة في الواقع كـ <title> علامة التبويب أثناء المصادقة:
(أي، هذا الجزء:)
يُستخدم crowd_title كعنوان لزر تسجيل الدخول (إذا كان لديك طرق تسجيل دخول متعددة ممكّنة)
إذا لم تقم بتوفير crowd_popup_title، فسيتم استخدام crowd_title لـ <title> علامة تبويب تسجيل الدخول.
fdanard
(Franck Danard)
30 نوفمبر 2021، 3:55م
15
حسناً.
أقول ذلك لأنه بالفعل، لا توجد نافذة منبثقة لتسجيل الدخول بعد التحديث. لدينا صفحة كاملة لتسجيل الدخول الآن.
بالمناسبة، هل هناك طريقة لتخصيص هذه الصفحة، مثل على سبيل المثال، الخلفية… إلخ؟
إعجاب واحد (1)
david
(David Taylor)
30 نوفمبر 2021، 4:35م
16
نعم، يمكنك استخدام DISCOURSE_CROWD_CUSTOM_CSS لإضافة قواعد CSS مخصصة إلى الصفحة
إعجاب واحد (1)
system
(system)
تم إغلاقه في
31 ديسمبر 2021، 8:04ص
18
This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.