feat: expose if a user is a local user through the /user endpoint

This commit is contained in:
kolaente 2021-10-31 13:57:19 +01:00
parent 516c812043
commit 2683ef23d5
Signed by untrusted user: konrad
GPG Key ID: F40E70337AB24C9B
1 changed files with 2 additions and 0 deletions

View File

@ -35,6 +35,7 @@ type userWithSettings struct {
user.User
Settings *UserSettings `json:"settings"`
DeletionScheduledAt time.Time `json:"deletion_scheduled_at"`
IsLocalUser bool `json:"is_local_user"`
}
// UserShow gets all informations about the current user
@ -74,6 +75,7 @@ func UserShow(c echo.Context) error {
WeekStart: u.WeekStart,
},
DeletionScheduledAt: u.DeletionScheduledAt,
IsLocalUser: u.Issuer == user.IssuerLocal,
}
return c.JSON(http.StatusOK, us)