Skip to content

Commit a2c63cd

Browse files
committed
fix(api): drop session.Role after base removed the field
Session no longer carries Role (removed upstream when the auth model moved to group-based permissions via HasPermissionAPI). Remove the stale session.Role reference from principalFromBearerToken and drop the corresponding test assertion that expected a role value the session mock never set. Closes the go vet compile error blocking pre-commit on PR #864.
1 parent e87f41a commit a2c63cd

2 files changed

Lines changed: 0 additions & 2 deletions

File tree

‎internal/api/middleware.go‎

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -163,7 +163,6 @@ func (h *Handler) principalFromBearerToken(ctx context.Context, req *events.Lamb
163163
Kind: PrincipalSession,
164164
UserID: session.UserID,
165165
Email: session.Email,
166-
Role: session.Role,
167166
Session: session,
168167
}
169168
}

‎internal/api/router_authuser_test.go‎

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -131,7 +131,6 @@ func TestRequireAuth_UserSession(t *testing.T) {
131131
require.NotNil(t, p)
132132
assert.Equal(t, PrincipalSession, p.Kind)
133133
assert.Equal(t, "uid", p.UserID)
134-
assert.Equal(t, "user", p.Role)
135134
assert.Equal(t, userSession, p.Session)
136135
}
137136

0 commit comments

Comments
 (0)