feat: allow an API token to be restricted to servers by tag

This commit is contained in:
2026-09-08 13:34:58 +00:00
parent e8e41f197a
commit f9df426e6c
5 changed files with 164 additions and 5 deletions
+1 -1
View File
@@ -110,7 +110,7 @@ func createToken(c *gin.Context) {
tok, plaintext, err := services.CreateAPIToken(
auth.InstanceID(c), auth.UserID(c),
body.Name, body.Role, body.Scopes, body.ExpiresInDays, c.ClientIP(),
body.Name, body.Role, body.Scopes, nil, body.ExpiresInDays, c.ClientIP(),
)
switch {
case errors.Is(err, services.ErrTokenNameTaken):