Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
protokollsystem
proto3
Commits
fbbbd0d8
Commit
fbbbd0d8
authored
Feb 17, 2018
by
Robin Sonnabend
Browse files
Fix static user backend
parent
d4081353
Changes
1
Show whitespace changes
Inline
Side-by-side
auth.py
View file @
fbbbd0d8
...
...
@@ -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