Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
itminedu
synnefo
Commits
48e1d007
Commit
48e1d007
authored
Jul 31, 2012
by
Sofia Papagiannaki
Browse files
Preserve local password for shibboleth users
Bug #2535
parent
3e5d60b5
Changes
2
Hide whitespace changes
Inline
Side-by-side
snf-astakos-app/astakos/im/forms.py
View file @
48e1d007
...
...
@@ -318,6 +318,12 @@ class LoginForm(AuthenticationForm):
check
=
captcha
.
submit
(
rcf
,
rrf
,
RECAPTCHA_PRIVATE_KEY
,
self
.
ip
)
if
not
check
.
is_valid
:
raise
forms
.
ValidationError
(
_
(
'You have not entered the correct words'
))
def
clean
(
self
):
super
(
LoginForm
,
self
).
clean
()
if
self
.
user_cache
.
provider
!=
'local'
:
raise
forms
.
ValidationError
(
_
(
'Local login is not the current authentication method for this account.'
))
return
self
.
cleaned_data
class
ProfileForm
(
forms
.
ModelForm
):
"""
...
...
snf-astakos-app/astakos/im/functions.py
View file @
48e1d007
...
...
@@ -258,7 +258,6 @@ def switch_account_to_shibboleth(user, local_user, greeting_template_name='im/we
user
.
delete
()
local_user
.
provider
=
'shibboleth'
local_user
.
set_unusable_password
()
local_user
.
third_party_identifier
=
user
.
third_party_identifier
local_user
.
save
()
send_greeting
(
local_user
,
greeting_template_name
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment