mirror of
https://github.com/usememos/memos.git
synced 2025-06-05 22:09:59 +02:00
chore: rename user role (#108)
* chore: rename user role to `host` * chore: related frontend changes * chore: fix migration file * chore: use tricky sql
This commit is contained in:
@ -143,7 +143,7 @@ func (s *Server) registerUserRoutes(g *echo.Group) {
|
||||
}
|
||||
if currentUser == nil {
|
||||
return echo.NewHTTPError(http.StatusBadRequest, fmt.Sprintf("Current session user not found with ID: %d", currentUserID)).SetInternal(err)
|
||||
} else if currentUser.Role != api.Owner {
|
||||
} else if currentUser.Role != api.Host {
|
||||
return echo.NewHTTPError(http.StatusForbidden, "Access forbidden for current session user").SetInternal(err)
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user