Closed
Description
We were attempting to enable a feature if a user was in a given group?
Configuration:
{
"unhidden": {
"default": false,
"rules": {
"Allow Admins": {
"when_match": true,
"conditions": [
{
"action": "IN",
"key": "enterpriseGroups",
"value": "Ent_Agents"
}
]
}
}
},
"hidden": {
"default": false
}
}
Context:
{
"username":"NRavuru@msaqa.local",
"enterpriseGroups":[
"Ent_Agents Only-Admin",
"Ent_Scout-SSO",
"Ent_Agents",
"ENT_Nuxeo_SSO_Dev",
"Ent_PropView-SSO",
"Ent_Bonds-SSO",
"Ent_PMTAgentDashboard-PaymentROTP",
"Ent_Agents-Independent",
"Ent_E1PQADashboard-SSO",
"Ent_Nuxeo-SSO-Preprod-General",
"ENT_FusionPC-MSA-Producer-CSR-Preprod"
],
"agencyOnlyGroups":[
"SuperAdmin"
],
"locationCodes":["180032","280473","320074",]
}
all_features: list[str] = feature_flags.get_enabled_features(context=context)
Expected Behavior
We expected the variable all_features to be a list with one element as follows:
- unhidden
Current Behavior
all_features is an empty list.
Possible Solution
Steps to Reproduce (for bugs)
- see details above.
Environment
- Powertools version used: 1.20.2
- Packaging format (Layers, PyPi): Layers
- AWS Lambda function runtime: 3.8
- Debugging logs
# paste logs here