Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Sign in
Toggle navigation
R
red-ci-cd
Project overview
Project overview
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
red-group-test
red-ci-cd
Commits
c11957f7
Commit
c11957f7
authored
Sep 27, 2019
by
John Red Medrano
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
removed checking of alphanumeric on the user level change password
parent
94d969e3
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
18 additions
and
17 deletions
+18
-17
app/applicationlayer/cms/template/header/views.py
app/applicationlayer/cms/template/header/views.py
+1
-1
app/applicationlayer/management/account/serializer.py
app/applicationlayer/management/account/serializer.py
+17
-16
No files found.
app/applicationlayer/cms/template/header/views.py
View file @
c11957f7
...
...
@@ -28,7 +28,7 @@ from app.businesslayer.changerequest.change_request_template import (
)
from
app.applicationlayer.management.account.serializer
import
ChangeRequestList
from
app.applicationlayer.cms.template.approver.serializers
import
ChangeRequestTemplateApproversSerializer
from
app.applicationlayer.cms.template.stakeholder.serializers
import
ChangeRequestTemplateStake
h
oldersSerializer
from
app.applicationlayer.cms.template.stakeholder.serializers
import
ChangeRequestTemplateStake
H
oldersSerializer
from
app.applicationlayer.cms.template.details.serializers
import
ChangeRequestTemplateDetailsSerializer
from
app.applicationlayer.cms.template.attachment.serializers
import
ChangeRequestTemplateAttachmentsSerializer
from
app.applicationlayer.cms.template.header.table_filters
import
headerFilter
...
...
app/applicationlayer/management/account/serializer.py
View file @
c11957f7
...
...
@@ -74,31 +74,32 @@ class ChangePasswordSerializer(serializers.Serializer):
if
validated_password
:
password
=
re
.
match
(
'([A-Za-z]+[0-9]|[0-9]+[A-Za-z])[A-Za-z0-9]*'
,
new_password
)
print
(
"password"
)
print
(
password
)
print
(
password
)
# password = re.match(
# '([A-Za-z]+[0-9]|[0-9]+[A-Za-z])[A-Za-z0-9]*',
# new_password
# )
if
password
:
#
if password:
new_password
=
make_password
(
new_password
)
instance_password
.
update
(
password
=
new_password
)
# instance = User.objects.get(code=str(instance))
return
instance
# new_password = make_password(new_password)
# instance_password.update(password=new_password)
# return instance
el
if
len
(
new_password
)
<=
5
:
if
len
(
new_password
)
<=
5
:
raise
serializers
.
ValidationError
(
'Password must be minimum of 6 characters'
)
else
:
new_password
=
make_password
(
new_password
)
instance_password
.
update
(
password
=
new_password
)
return
instance
raise
serializers
.
ValidationError
(
'password must be alpha numeric format'
)
# else:
# raise serializers.ValidationError(
# 'password must be alpha numeric format'
# )
else
:
raise
serializers
.
ValidationError
(
'Please ensure the old password is correct and both new password & confirm password are the same.'
)
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