How to get package version in authentication plugins allow_access callback? #4107
Unanswered
alexanderkraus
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi,
I'm currently experimenting the possibilities of authentication plugins and observed that for the
allow_access
callback of the plugin, theversion
field inside the 2nd parameterpkg
is alwaysundefined
.(Referring to the docs: https://verdaccio.org/docs/plugin-auth#allow_access-allow_publish-or-allow_unpublish-callback)
From what I saw in the code, the information should come from the "allow" middleware:
verdaccio/packages/middleware/src/middlewares/allow.ts
Lines 22 to 24 in acdf96a
but is only calculated if
req.params.filename
is set.Is this intended behavior? I expected the
version
to be the currently requested/resolved package`s version.Is there anything special to do to make the package manager send this
filename
parameter when installing packages?Beta Was this translation helpful? Give feedback.
All reactions