Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
S
slapos.core
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Roque
slapos.core
Commits
2fc808b8
Commit
2fc808b8
authored
Jun 27, 2017
by
Alain Takoudjou
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix PAS: do not return None when person is found
parent
11dab143
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
3 deletions
+5
-3
master/product/SlapOS/SlapOSMachineAuthenticationPlugin.py
master/product/SlapOS/SlapOSMachineAuthenticationPlugin.py
+5
-3
No files found.
master/product/SlapOS/SlapOSMachineAuthenticationPlugin.py
View file @
2fc808b8
...
...
@@ -132,14 +132,16 @@ class SlapOSMachineAuthenticationPlugin(BasePlugin):
# search for user linked to this serial
certificate_login_list
=
self
.
portal_catalog
.
unrestrictedSearchResults
(
portal_type
=
self
.
certificate_portal_type
,
reference
=
serial
)
# XXX - reference should not contain '.crt.pem' here
reference
=
serial
.
lower
()
+
'.crt.pem'
,
validation_state
=
'validated'
)
creds
[
'machine_login'
]
=
None
if
len
(
certificate_login_list
)
!=
0
:
if
len
(
certificate_login_list
)
>
1
:
raise
ConsistencyError
(
'There is more than one of %s whose
\
serial is %s'
%
(
self
.
certificate_portal_type
,
serial
))
creds
[
'machine_login'
]
=
certificate_login_list
[
0
]
\
.
getParent
().
getReference
()
.
getParentValue
().
getReference
()
elif
user_id
is
not
None
:
creds
[
'machine_login'
]
=
user_id
else
:
...
...
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