Chore: Fix issues reported by staticcheck; enable stylecheck linter (#28866)
* Chore: Fix issues reported by staticcheck Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com> * Apply suggestions from code review Co-authored-by: Emil Tullstedt <emil.tullstedt@grafana.com>
This commit is contained in:
co-authored by
Emil Tullstedt
parent
135b83e17f
commit
676d393ec9
+5
-5
@@ -204,16 +204,16 @@ type UpdateUserLastSeenAtCommand struct {
|
||||
UserId int64
|
||||
}
|
||||
|
||||
func (user *SignedInUser) HasRole(role RoleType) bool {
|
||||
if user.IsGrafanaAdmin {
|
||||
func (u *SignedInUser) HasRole(role RoleType) bool {
|
||||
if u.IsGrafanaAdmin {
|
||||
return true
|
||||
}
|
||||
|
||||
return user.OrgRole.Includes(role)
|
||||
return u.OrgRole.Includes(role)
|
||||
}
|
||||
|
||||
func (user *SignedInUser) IsRealUser() bool {
|
||||
return user.UserId != 0
|
||||
func (u *SignedInUser) IsRealUser() bool {
|
||||
return u.UserId != 0
|
||||
}
|
||||
|
||||
type UserProfileDTO struct {
|
||||
|
||||
Reference in New Issue
Block a user