|
@@ -144,12 +144,21 @@
|
|
|
</form>
|
|
</form>
|
|
|
</div>
|
|
</div>
|
|
|
{% endif %}
|
|
{% endif %}
|
|
|
- {% if passportGoogleLoginEnabled() || passportGitHubLoginEnabled() || passportFacebookLoginEnabled() || passportTwitterLoginEnabled() || getConfig('crowi', 'security:passport-oidc:isEnabled') || passportSamlLoginEnabled() %}
|
|
|
|
|
|
|
+ {% if (
|
|
|
|
|
+ getConfig('crowi', 'security:isEnabledPassport') && (
|
|
|
|
|
+ getConfig('crowi', 'security:passport-google:isEnabled') ||
|
|
|
|
|
+ getConfig('crowi', 'security:passport-github:isEnabled') ||
|
|
|
|
|
+ getConfig('crowi', 'security:passport-facebook:isEnabled') ||
|
|
|
|
|
+ getConfig('crowi', 'security:passport-twitter:isEnabled')||
|
|
|
|
|
+ getConfig('crowi', 'security:passport-oidc:isEnabled') ||
|
|
|
|
|
+ getConfig('crowi', 'security:passport-saml:isEnabled')
|
|
|
|
|
+ )
|
|
|
|
|
+ ) %}
|
|
|
<hr class="mb-1">
|
|
<hr class="mb-1">
|
|
|
<div class="collapse collapse-oauth collapse-anchor">
|
|
<div class="collapse collapse-oauth collapse-anchor">
|
|
|
<div class="spacer"></div>
|
|
<div class="spacer"></div>
|
|
|
<div class="d-flex flex-row justify-content-between flex-wrap">
|
|
<div class="d-flex flex-row justify-content-between flex-wrap">
|
|
|
- {% if passportGoogleLoginEnabled() %}
|
|
|
|
|
|
|
+ {% if getConfig('crowi', 'security:isEnabledPassport') && getConfig('crowi', 'security:passport-google:isEnabled') %}
|
|
|
<form role="form" action="/passport/google" class="d-inline-flex flex-column">
|
|
<form role="form" action="/passport/google" class="d-inline-flex flex-column">
|
|
|
<button type="submit" class="fcbtn btn btn-1b btn-login-oauth d-flex" id="google">
|
|
<button type="submit" class="fcbtn btn btn-1b btn-login-oauth d-flex" id="google">
|
|
|
<span class="btn-label"><i class="fa fa-google"></i></span>
|
|
<span class="btn-label"><i class="fa fa-google"></i></span>
|
|
@@ -158,7 +167,7 @@
|
|
|
<div class="small text-right">by Google Account</div>
|
|
<div class="small text-right">by Google Account</div>
|
|
|
</form>
|
|
</form>
|
|
|
{% endif %}
|
|
{% endif %}
|
|
|
- {% if passportGitHubLoginEnabled() %}
|
|
|
|
|
|
|
+ {% if getConfig('crowi', 'security:isEnabledPassport') && getConfig('crowi', 'security:passport-github:isEnabled') %}
|
|
|
<form role="form" action="/passport/github" class="d-inline-flex flex-column">
|
|
<form role="form" action="/passport/github" class="d-inline-flex flex-column">
|
|
|
<input type="hidden" name="_csrf" value="{{ csrf() }}">
|
|
<input type="hidden" name="_csrf" value="{{ csrf() }}">
|
|
|
<button type="submit" class="fcbtn btn btn-1b btn-login-oauth d-inline-flex" id="github">
|
|
<button type="submit" class="fcbtn btn btn-1b btn-login-oauth d-inline-flex" id="github">
|
|
@@ -168,7 +177,7 @@
|
|
|
<div class="small text-right">by GitHub Account</div>
|
|
<div class="small text-right">by GitHub Account</div>
|
|
|
</form>
|
|
</form>
|
|
|
{% endif %}
|
|
{% endif %}
|
|
|
- {% if passportFacebookLoginEnabled() %}
|
|
|
|
|
|
|
+ {% if getConfig('crowi', 'security:isEnabledPassport') && getConfig('crowi', 'security:passport-facebook:isEnabled')() %}
|
|
|
<form role="form" action="/passport/facebook" class="d-inline-flex flex-column">
|
|
<form role="form" action="/passport/facebook" class="d-inline-flex flex-column">
|
|
|
<input type="hidden" name="_csrf" value="{{ csrf() }}">
|
|
<input type="hidden" name="_csrf" value="{{ csrf() }}">
|
|
|
<button type="submit" class="fcbtn btn btn-1b btn-login-oauth d-inline-flex" id="facebook">
|
|
<button type="submit" class="fcbtn btn btn-1b btn-login-oauth d-inline-flex" id="facebook">
|
|
@@ -178,7 +187,7 @@
|
|
|
<div class="small text-right">by Facebook Account</div>
|
|
<div class="small text-right">by Facebook Account</div>
|
|
|
</form>
|
|
</form>
|
|
|
{% endif %}
|
|
{% endif %}
|
|
|
- {% if passportTwitterLoginEnabled() %}
|
|
|
|
|
|
|
+ {% if getConfig('crowi', 'security:isEnabledPassport') && getConfig('crowi', 'security:passport-twitter:isEnabled') %}
|
|
|
<form role="form" action="/passport/twitter" class="d-inline-flex flex-column">
|
|
<form role="form" action="/passport/twitter" class="d-inline-flex flex-column">
|
|
|
<input type="hidden" name="_csrf" value="{{ csrf() }}">
|
|
<input type="hidden" name="_csrf" value="{{ csrf() }}">
|
|
|
<button type="submit" class="fcbtn btn btn-1b btn-login-oauth d-inline-flex" id="twitter">
|
|
<button type="submit" class="fcbtn btn btn-1b btn-login-oauth d-inline-flex" id="twitter">
|
|
@@ -195,10 +204,10 @@
|
|
|
<span class="btn-label"><i class="fa fa-openid"></i></span>
|
|
<span class="btn-label"><i class="fa fa-openid"></i></span>
|
|
|
<span class="btn-label-text">{{ t('Sign in') }}</span>
|
|
<span class="btn-label-text">{{ t('Sign in') }}</span>
|
|
|
</button>
|
|
</button>
|
|
|
- <div class="small text-right">{{ config.crowi['security:passport-oidc:providerName'] || "OpenID Connect" }}</div>
|
|
|
|
|
|
|
+ <div class="small text-right">{{ getConfig('crowi', 'security:passport-oidc:providerName') || "OpenID Connect" }}</div>
|
|
|
</form>
|
|
</form>
|
|
|
{% endif %}
|
|
{% endif %}
|
|
|
- {% if passportSamlLoginEnabled() %}
|
|
|
|
|
|
|
+ {% if getConfig('crowi', 'security:isEnabledPassport') && getConfig('crowi', 'security:passport-saml:isEnabled') %}
|
|
|
<form role="form" action="/passport/saml" class="d-inline-flex flex-column">
|
|
<form role="form" action="/passport/saml" class="d-inline-flex flex-column">
|
|
|
<input type="hidden" name="_csrf" value="{{ csrf() }}">
|
|
<input type="hidden" name="_csrf" value="{{ csrf() }}">
|
|
|
<button type="submit" class="fcbtn btn btn-1b btn-login-oauth d-inline-flex" id="saml">
|
|
<button type="submit" class="fcbtn btn btn-1b btn-login-oauth d-inline-flex" id="saml">
|