-
Notifications
You must be signed in to change notification settings - Fork 2.8k
fix console permissions bug #1562
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
Conversation
|
Review app for commit a6b70e5 deployed to Heroku: https://hge-ci-pull-1562.herokuapp.com |
wawhal
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Tested. LGTM.
|
Need one more review, @praveenweb @karthikvt26 ? |
|
Review app for commit f1b2542 deployed to Heroku: https://hge-ci-pull-1562.herokuapp.com |
|
Review app https://hge-ci-pull-1562.herokuapp.com is deleted |
### What
Add support for environment variables in permission filters by
introducing a new `ValueFromEnv` variant. This enhancement allows users
to reference environment variables in permission rules and value
expressions, similar to how `sessionVariable` and `literal` values work.
Key changes:
- Added `ValueFromEnv` variant to `ValueExpression` and
`ValueExpressionOrPredicate`
- Updated environment variables handling to support JSON values instead
of strings (we need this as the literal values can be something other
than `String` as well
- Added changes to JSON schemas for the types as well
### How
1. Modified `crates/open-dds/src/permissions.rs`:
- Split `ValueExpression` and `ValueExpressionOrPredicate` into base
enums and their schema implementation counterparts
(`ValueExpressionImpl` and `ValueExpressionOrPredicateImpl`)
- Added `ValueFromEnv` variant to support environment variable
references
- Implemented proper JSON schema generation through `OpenDd` trait
2. Updated environment variables handling in
`build/environment_variables.rs`:
- Changed value type from `String` to `serde_json::Value` to support
various value types
- Updated injection and restoration logic to handle JSON values
Users can now reference environment variables in their permissions
metadata:
```json
{
"role": "artist1",
"select": {
"filter": {
"fieldComparison": {
"field": "ArtistId",
"operator": "_eq",
"value": {
"valueFromEnv": "ENV_VAR1"
}
}
}
}
}
```
### Internal details
V3_GIT_ORIGIN_REV_ID: 2dc2da8b7266d9c68887ac27990ba8bbea17166b
Description
Fixes bug in permission builder. Columns of object relationships in a non-public schema weren't showing up.
What component does this PR affect?
Requires changes from other components? If yes, please mark the components:
Related Issue
Solution and Design
Type
Checklist: