feat: complete SOP execution workflow

This commit is contained in:
Eric 1549169735@qq.com
2026-08-09 00:29:26 +08:00
parent e32025d2ca
commit c5ab886b70
63 changed files with 1229 additions and 215 deletions

View File

@@ -78,7 +78,7 @@ func (s *Service) Refresh(rawToken string) (TokenPair, error) {
return TokenPair{}, ErrInvalidCredentials
}
var user model.User
if err := s.db.First(&user, stored.UserID).Error; err != nil {
if err := s.db.Where("id = ? AND status = ?", stored.UserID, "active").First(&user).Error; err != nil {
return TokenPair{}, err
}
principal, err := s.principalForTenant(user, stored.TenantID)