Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
10
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Open sidebar
protokollsystem
common-web
Commits
5acbe6f4
Commit
5acbe6f4
authored
Feb 17, 2018
by
Robin Sonnabend
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix static user backend
parent
4ba395e2
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
3 deletions
+3
-3
auth.py
auth.py
+3
-3
No files found.
auth.py
View file @
5acbe6f4
...
...
@@ -143,7 +143,7 @@ class StaticUserManager:
username
:
password
for
(
username
,
password
,
groups
)
in
users
}
self
.
group
s
=
{
self
.
group
_map
=
{
username
:
groups
for
(
username
,
password
,
groups
)
in
users
}
...
...
@@ -154,8 +154,8 @@ class StaticUserManager:
and
self
.
passwords
[
username
]
==
password
)
def
groups
(
self
,
username
,
password
=
None
):
if
username
in
self
.
group
s
:
yield
from
self
.
group
s
[
username
]
if
username
in
self
.
group
_map
:
yield
from
self
.
group
_map
[
username
]
def
all_groups
(
self
):
yield
from
list
(
set
(
group
for
group
in
groups
.
values
()))
...
...
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