Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Set-vRAEntitlement assumes EntitledCatalogItems #180

Closed
feardamhan opened this issue May 18, 2018 · 2 comments
Closed

Set-vRAEntitlement assumes EntitledCatalogItems #180

feardamhan opened this issue May 18, 2018 · 2 comments
Assignees
Labels
Milestone

Comments

@feardamhan
Copy link

As currently written, when adding a Catalog Item to an Entitlement, Set-vRAEntitlement requires that the Catalog Item already be available to the logged in user via another entitlement. It does this by calling Get-vRAEntitledCatalogItem when attempting to retrieve the catalog item to add. It therefore fails when trying to find a catalog item that is present but which the current user is not entitled to

In this way it behaves differently to when adding a Resource Action which uses Get-vRAResourceOperation to get the Resource Action

Modifying Set-vRAEntitlement to use Get-vRACatalogItem rather than Get-vRAEntitledCatalogItem (and changing flag from EntitledCatalogItems to CatalogItems for clarity) would resolve the issue, and serve both use cases, as would adding an additional parameter such as NonEntitledCatalogItems and having that use Get-vRACatalogItem rather than Get-vRAEntitledCatalogItem

@jonathanmedd jonathanmedd added this to the 3.3.0 milestone May 18, 2018
@jonathanmedd jonathanmedd self-assigned this Jun 26, 2018
@jonathanmedd
Copy link
Contributor

@feardamhan I agree and I've changed my initial reading of this from being an enhancement to a bug. We should use Get-vRACatalogItem instead of Get-vRAEntitledCatalogItem to make it consistent with how we add Services and Resource Operations.

Also, we are already using Get-vRACatalogItem , not Get-vRAEntitledCatalogItem to do the same thing in New-vRAEntitlement, so should be consistent with that too.

I'll be updating the code accordingly ASAP to resolve this.

@feardamhan
Copy link
Author

Sweet. Thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants