feat: audit api, sdwan persist, relay fallback updates
This commit is contained in:
@@ -26,6 +26,17 @@ func (s *Server) ResolveAccess(r *http.Request, masterToken uint64) (*AccessCont
|
||||
return s.ResolveTenantAccessToken(tok)
|
||||
}
|
||||
|
||||
func GetAccessContext(r *http.Request) *AccessContext {
|
||||
v := r.Context().Value(ServerCtxKeyAccess{})
|
||||
if v == nil {
|
||||
return nil
|
||||
}
|
||||
if ac, ok := v.(*AccessContext); ok {
|
||||
return ac
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func (s *Server) ResolveTenantAccessToken(tok string) (*AccessContext, bool) {
|
||||
if tok == "" || s.store == nil {
|
||||
return nil, false
|
||||
|
||||
Reference in New Issue
Block a user