Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
corteza
corteza-server
Commits
44498c32
Commit
44498c32
authored
5 years ago
by
Denis Arh
Browse files
Options
Download
Email Patches
Plain Diff
Fix missing (super)user on provision
parent
b4801073
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
0 deletions
+9
-0
system/service/user.go
system/service/user.go
+9
-0
No files found.
system/service/user.go
View file @
44498c32
...
...
@@ -143,6 +143,15 @@ func (svc user) FindByID(ID uint64) (*types.User, error) {
return
nil
,
ErrInvalidID
.
withStack
()
}
tmp
:=
internalAuth
.
NewIdentity
(
ID
)
if
internalAuth
.
IsSuperUser
(
tmp
)
{
// Handling case when looking for a super-user
//
// Currently, superuser is a virtual entity
// and does not exists in the db
return
&
types
.
User
{
ID
:
ID
},
nil
}
return
svc
.
proc
(
svc
.
user
.
FindByID
(
ID
))
}
...
...
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