raystack / guardian

Guardian is universal data access management tool with automated access workflows and security controls across data stores, analytical systems, and cloud products.
https://guardian.vercel.app/
Apache License 2.0
137 stars 21 forks source link

feat: add resources conditionally #323

Closed singhvikash11 closed 1 year ago

singhvikash11 commented 1 year ago

Closes #313

vercel[bot] commented 1 year ago

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Updated
guardian ✅ Ready (Inspect) Visit Preview Nov 14, 2022 at 7:21AM (UTC)
coveralls commented 1 year ago

Pull Request Test Coverage Report for Build 3836017041


Changes Missing Coverage Covered Lines Changed/Added Lines %
core/provider/service.go 18 20 90.0%
pkg/evaluator/expression.go 8 12 66.67%
<!-- Total: 27 33 81.82% -->
Files with Coverage Reduction New Missed Lines %
core/provider/service.go 9 74.51%
<!-- Total: 9 -->
Totals Coverage Status
Change from base Build 3826744950: -0.07%
Covered Lines: 7119
Relevant Lines: 9744

💛 - Coveralls
singhvikash11 commented 1 year ago

let's add a validation on provider create&update for this new filter field. We can create a dummy resource and try to evaluate the expression onto that resource to see if the expression if valid and working or not

https://github.com/odpf/guardian/blob/filter_resource/core/provider/service_test.go#L323 I have verified this manually also

singhvikash11 commented 1 year ago

@rahmatrhd @mabdh @bsushmith please review changes and approve the pr so we can merge it

ravisuhag commented 1 year ago

@rahmatrhd Please see if we can review and close this.