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

adding permissions for cli.config.read and code fix for non admin use… #313

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

niravparikh05
Copy link
Contributor

…rs cli config download

What does this PR change?

Does the PR depend on any other PRs or Issues? If yes, please list them.

Checklist

I confirm, that I have...

  • Read and followed the contributing guide in CONTRIBUTING.md
  • Added tests for this PR
  • Formatted the code using go fmt (if applicable)
  • Updated documentation on the Paralus docs site (if applicable)
  • Updated CHANGELOG.md

…rs cli config download

Signed-off-by: Nirav Parikh <nir.parikh05@gmail.com>
pkg/service/user.go Show resolved Hide resolved
pkg/service/user.go Show resolved Hide resolved

err := db.NewSelect().Model(&aps).
Where("account_id = ?", accountID).
Where("permission_name = ?", permission).
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Shouldn't we consider partner_id and organization_id when fetching account details?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

at this point, we have account information from user session. Also until one of the recent release identities does not have partner, organization information - for backward compatibility, we can relay on the logged in user session information.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

looking into a fix which would consider organization, partner information if available otherwise ignore to ensure backward compatibility.

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

Successfully merging this pull request may close these issues.

Unable to download cli config for non-admin users
2 participants