Skip to content

Commit

Permalink
use cores 1.32 (#376)
Browse files Browse the repository at this point in the history
* use cores 1.32

* add env variable to enable superdesk login

set SUPERDESK_AUTH env to anything to show the form

SDNTB-626 SDNTB-630
  • Loading branch information
petrjasek authored May 13, 2020
1 parent c2b0aec commit db40a54
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 12 deletions.
16 changes: 8 additions & 8 deletions client/ntb/views/login-modal.html
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,13 @@

<div class="form-handler" ng-show="!changePassword">
<figure class="avatar" style="background-image:url('{{ identity.Avatar.href || 'images/avatar_200.png' }}')" ng-show="identity.Avatar"></figure>
<form name="loginForm" ng-submit="authenticate()" ng-show="!methods.google">
<fieldset class="inputs">
<form name="loginForm" ng-submit="authenticate()">
<fieldset class="inputs" ng-if="features.auth_db">
<input type="text" id="login-username" ng-model="username" placeholder="{{ 'username'|translate }}" class="fullwidth-input" ng-disabled="identity.Id" required />
<input type="password" id="login-password" ng-model="password" placeholder="{{ 'password'|translate }}" class="fullwidth-input login-pass" required />
</fieldset>

<fieldset class="buttons">
<fieldset class="buttons" ng-if="features.auth_db">
<button ng-disabled="isLoading" id="login-btn" type="submit" class="btn btn--sd-green">
{{ 'Log In' | translate }}
<div class="spinner" ng-show="isLoading">
Expand All @@ -24,12 +24,12 @@
</div>
</button>
</fieldset>
</form>

<fieldset class="buttons" ng-show="methods.google">
<button class="btn btn--sd-green"
ng-click="openLoginPopup('google')" translate>Log In with Google</button>
</fieldset>
<fieldset class="buttons" ng-if="methods.google">
<button class="btn btn--sd-green"
ng-click="openLoginPopup('google')" translate>Log In with Google</button>
</fieldset>
</form>

<a href="/#/secure-login/" class="text" ng-show="methods.xmpp" translate>Secure login</a>

Expand Down
2 changes: 1 addition & 1 deletion client/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,6 @@
"dependencies": {
"draft-js": "github:tomaskikutis/draft-js#add-subscript-superscript",
"superdesk-core": "superdesk/superdesk-client-core#1.32",
"superdesk-planning": "github:superdesk/superdesk-planning#1.33.0"
"superdesk-planning": "github:superdesk/superdesk-planning#master"
}
}
4 changes: 2 additions & 2 deletions server/requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,5 @@ honcho==1.0.1
newrelic==2.88.1.73
feedgen==0.7.0

-e git+git://github.com/superdesk/superdesk-core.git@develop#egg=Superdesk-Core
-e git+git://github.com/superdesk/superdesk-planning.git@271e6261#egg=superdesk-planning
git+git://github.com/superdesk/superdesk-core.git@1.32#egg=Superdesk-Core
git+git://github.com/superdesk/superdesk-planning.git@master#egg=superdesk-planning
2 changes: 1 addition & 1 deletion server/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -263,5 +263,5 @@

# if google auth is not configured enable password auth
google_confs = [os.environ.get(conf) for conf in ('GOOGLE_CLIENT_ID', 'GOOGLE_CLIENT_SECRET')]
if not all(google_confs):
if not all(google_confs) or os.environ.get('SUPERDESK_AUTH'):
INSTALLED_APPS.append('apps.auth.db')

0 comments on commit db40a54

Please sign in to comment.