Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
feudal
feudalBackend
Commits
da18bf88
Commit
da18bf88
authored
Aug 06, 2018
by
Lukas Burgey
Browse files
Change default user type
parent
a0cad6fb
Changes
1
Hide whitespace changes
Inline
Side-by-side
feudal/backend/models/users.py
View file @
da18bf88
...
...
@@ -26,7 +26,6 @@ class User(AbstractUser):
user_type
=
models
.
CharField
(
max_length
=
20
,
choices
=
TYPE_CHOICES
,
default
=
'apiclient'
,
)
sub
=
models
.
CharField
(
max_length
=
150
,
...
...
@@ -152,7 +151,7 @@ class User(AbstractUser):
return
self
.
_is_active
def
__str__
(
self
):
if
self
.
user_type
==
'admin'
:
if
self
.
is_superuser
:
return
'ADMIN {}'
.
format
(
self
.
username
)
elif
self
.
user_type
==
'oidcuser'
:
if
not
self
.
is_active
:
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new 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