Automatic Merge
Этот коммит содержится в:
Martin Kraft
2021-04-27 12:36:05 -04:00
коммит произвёл GitHub
родитель 684cd93755
Коммит 49178bf480
6 изменённых файлов: 15 добавлений и 36 удалений

Просмотреть файл

@@ -27,16 +27,12 @@ func (a *App) GetRole(id string) (*model.Role, *model.AppError) {
}
}
return role, nil
}
func (a *App) GetAllRoles() ([]*model.Role, *model.AppError) {
roles, err := a.Srv().Store.Role().GetAll()
if err != nil {
return nil, model.NewAppError("GetAllRoles", "app.role.get_all.app_error", nil, err.Error(), http.StatusInternalServerError)
appErr := a.Srv().mergeChannelHigherScopedPermissions([]*model.Role{role})
if appErr != nil {
return nil, appErr
}
return roles, nil
return role, nil
}
func (s *Server) GetRoleByName(ctx context.Context, name string) (*model.Role, *model.AppError) {