feat: expose if a user is a local user through the /user endpoint
This commit is contained in:
parent
516c812043
commit
2683ef23d5
1 changed files with 2 additions and 0 deletions
|
@ -35,6 +35,7 @@ type userWithSettings struct {
|
||||||
user.User
|
user.User
|
||||||
Settings *UserSettings `json:"settings"`
|
Settings *UserSettings `json:"settings"`
|
||||||
DeletionScheduledAt time.Time `json:"deletion_scheduled_at"`
|
DeletionScheduledAt time.Time `json:"deletion_scheduled_at"`
|
||||||
|
IsLocalUser bool `json:"is_local_user"`
|
||||||
}
|
}
|
||||||
|
|
||||||
// UserShow gets all informations about the current user
|
// UserShow gets all informations about the current user
|
||||||
|
@ -74,6 +75,7 @@ func UserShow(c echo.Context) error {
|
||||||
WeekStart: u.WeekStart,
|
WeekStart: u.WeekStart,
|
||||||
},
|
},
|
||||||
DeletionScheduledAt: u.DeletionScheduledAt,
|
DeletionScheduledAt: u.DeletionScheduledAt,
|
||||||
|
IsLocalUser: u.Issuer == user.IssuerLocal,
|
||||||
}
|
}
|
||||||
|
|
||||||
return c.JSON(http.StatusOK, us)
|
return c.JSON(http.StatusOK, us)
|
||||||
|
|
Loading…
Reference in a new issue