MCPcopy Create free account
hub / github.com/belak/gitdir / validateUser

Method validateUser

config_validate.go:21–27  ·  view source on GitHub ↗
(u *User)

Source from the content-addressed store, hash-verified

19}
20
21func (c *Config) validateUser(u *User) error {
22 if _, ok := c.Users[u.Username]; !ok {
23 return fmt.Errorf("cannot remove current user: %s", u.Username)
24 }
25
26 return nil
27}
28
29func (c *Config) validatePublicKey(pk *models.PublicKey) error {
30 if _, ok := c.publicKeys[pk.RawMarshalAuthorizedKey()]; !ok {

Callers 1

ValidateMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected