-
We have installed keygen CE 1.50 We have 1 product and associated packages and their releases. Releases have their entitlement to limit which releases can be accessed by different users. Now when the user calls the list all packages with their license token, keygen returns all packages out of which some of it, user is not entitled to any of the release for that particular package. To find out whether the user is entitled of any of the releases within a package, we have to iterate over every package and check if there exists a release for that user using their license token. This iteration may take a long time if the product has many packages underneath it. Would there be a nicer/better/recommended way of getting only the packages for which there exists a entitled release? The other way would be to list all releases and collect all unique packages names but releases can be many. Iterating through each release, which can be many, can be time consuming. Also the list all releases doesn't seem have only latest release per package so this way may not be the best way. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
Packages are currently treated like products, channels and platforms — where if a release exists for it, it's available to read for all users. We don't check entitlements on packages, mostly because it would be very expensive to do so — we'd need to query all releases for a particular package to check if the current user is entitled to any of those releases. My recommendation would be to list all packages (since typically an account has considerably less packages than releases), and then attempt to retrieve the latest release for that package, and if one doesn't exist, then don't show the package to the end-user. One way we could improve this workflow would be by introducing package-level entitlement constraints, but we don't currently have any plans to implement that. However, we'd be open to a pull request if your team is interested in implementing. |
Beta Was this translation helpful? Give feedback.
Packages are currently treated like products, channels and platforms — where if a release exists for it, it's available to read for all users. We don't check entitlements on packages, mostly because it would be very expensive to do so — we'd need to query all releases for a particular package to check if the current user is entitled to any of those releases.
My recommendation would be to list all packages (since typically an account has considerably less packages than releases), and then attempt to retrieve the latest release for that package, and if one doesn't exist, then don't show the package to the end-user.
One way we could improve this workflow would be by introducing package-level…