feat(client): tenant management commands
This commit is contained in:
@ -83,7 +83,7 @@ func (a *Authenticator) Authenticate(ctx context.Context, r *http.Request) (auth
|
||||
return nil, errors.WithStack(auth.ErrUnauthenticated)
|
||||
}
|
||||
|
||||
contactedAt := time.Now()
|
||||
contactedAt := time.Now().UTC()
|
||||
|
||||
agent, err = a.repo.Update(ctx, agent.ID, datastore.WithAgentUpdateContactedAt(contactedAt))
|
||||
if err != nil {
|
||||
|
@ -1,4 +1,4 @@
|
||||
package thirdparty
|
||||
package user
|
||||
|
||||
import (
|
||||
"context"
|
@ -1,4 +1,4 @@
|
||||
package thirdparty
|
||||
package user
|
||||
|
||||
import (
|
||||
"context"
|
@ -1,4 +1,4 @@
|
||||
package thirdparty
|
||||
package user
|
||||
|
||||
import (
|
||||
"forge.cadoles.com/Cadoles/emissary/internal/auth"
|
||||
@ -10,12 +10,13 @@ type Role string
|
||||
const (
|
||||
RoleWriter Role = "writer"
|
||||
RoleReader Role = "reader"
|
||||
RoleAdmin Role = "admin"
|
||||
)
|
||||
|
||||
func isValidRole(r string) bool {
|
||||
rr := Role(r)
|
||||
|
||||
return rr == RoleWriter || rr == RoleReader
|
||||
return rr == RoleWriter || rr == RoleReader || rr == RoleAdmin
|
||||
}
|
||||
|
||||
type User struct {
|
Reference in New Issue
Block a user