Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
S
slapos.toolbox
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
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Rafael Monnerat
slapos.toolbox
Commits
3d28f5b5
Commit
3d28f5b5
authored
8 years ago
by
Nicolas Wavrant
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
slaprunner: createNewUser doesn't depend on slapos to create a htpasswd file
parent
92680783
master
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
4 deletions
+5
-4
slapos/runner/utils.py
slapos/runner/utils.py
+5
-4
No files found.
slapos/runner/utils.py
View file @
3d28f5b5
...
...
@@ -111,12 +111,13 @@ def getUsernameList(config):
def
createNewUser
(
config
,
name
,
passwd
):
htpasswdfile
=
os
.
path
.
join
(
config
[
'etc_dir'
],
'.htpasswd'
)
if
os
.
path
.
exists
(
htpasswdfile
)
:
htpasswd
=
HtpasswdFile
(
htpasswdfile
)
try
:
htpasswd
=
HtpasswdFile
(
htpasswdfile
,
new
=
(
not
os
.
path
.
exists
(
htpasswdfile
))
)
htpasswd
.
set_password
(
name
,
passwd
)
htpasswd
.
save
()
return
True
return
False
except
IOError
:
return
False
return
True
def
getCurrentSoftwareReleaseProfile
(
config
):
"""
...
...
This diff is collapsed.
Click to expand it.
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