modify authorization middleware for support filtering in RBAC in whale