MCPcopy Create free account
hub / github.com/astercloud/aster / GetUser

Method GetUser

pkg/security/access_control.go:359–369  ·  view source on GitHub ↗

GetUser 获取用户

(userID string)

Source from the content-addressed store, hash-verified

357
358// GetUser 获取用户
359func (ac *AccessController) GetUser(userID string) (*User, error) {
360 ac.mu.RLock()
361 defer ac.mu.RUnlock()
362
363 user, exists := ac.users[userID]
364 if !exists {
365 return nil, fmt.Errorf("user %s not found", userID)
366 }
367
368 return user, nil
369}
370
371// UpdateUser 更新用户
372func (ac *AccessController) UpdateUser(user *User) error {

Calls

no outgoing calls