Welcome to the Inedo Forums! Check out the Forums Guide for help getting started.
If you are experiencing any issues with the forum software, please visit the Contact Form on our website and let us know!
How to use ProGet extension to white list a specified package that is being blocked under "License Rules"?
-
ProGet "License Rules" blocks packages based on the license of a package as well as the licenses of its dependencies.
I would like to white list specific packages whose dependencies may or may not be on the "License Rules" blocking list. So far, I have been experimenting with the ProGet SDK (e.g. PackageAccessRule, PackageFilter).
However, I have not had any luck yet since the documentation of the SDK is not very helpful. Therefore, I would like to ask
- Can a ProGet custom extension overwrite the License Rules?
- Even if the extension can overwrite the License Rules, is it a good way of doing so? Is there a better way to achieve this?
- Assume building a custom extension is the only way, what should the extension be built out of (i.e. PackageAccessRule? PackageFilter? or ...)? Is there any tutorial/example?
- How to log any message from the extension for debug purpose? I have been trying with Inedo.Diagnostics.Logger from the "InedoLib" that comes with the ProGet SDK yet I cannot find where it is logging to.
Any help is much appreciated. Thanks.
Product: ProGet
Version: 4.7.14
-
I'm afraid I don't really understand the requirements for what you're trying to accomplish...
Here are the differences between the two extensibility points:
- A Package Filter allows all locally-stored ProGet packages to be filtered from being shown in feeds by additional logic.
- A Package Access Rule Allows for rules to block downloads of packages based on additional logic.
The Package Access Rule is used by the Whitesource extension, so you can reference how that works. We don't have any publicly available uses of Package Filters; it was incorporated for a very specific usecase with publicly-available feeds.