lahirujayathilake commented on code in PR #740:
URL: https://github.com/apache/airavata-custos/pull/740#discussion_r4591327492
##########
pkg/identity/middleware.go:
##########
@@ -147,6 +147,17 @@ func (r *Router) RequirePrivilege(pattern string,
privilege models.PrivilegeKey,
})
}
+// RequireServiceAccount registers a handler only a service account holding
privilege can call.
+func (r *Router) RequireServiceAccount(pattern string, privilege
models.PrivilegeKey, handler http.HandlerFunc) {
Review Comment:
@yasithdev, If we want to expose an endpoint for both a privileged user and
a service account then aren't we restricting the flexibility doing this way?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]