09/29/2022, 11:20 AM
Hi all! Been using growthbook for about 1 month and loving it so far! I have a question about a “compound” rule and would love to get some takes here. There’s a feature in my app that is behind a flag. I need to flag to be enabled at a company level, but grant additional permissions within that flag to only certain users in that company. My first thought was to create two flags, and have the first one govern the feature and the second one govern user access but I was wondering if that was best approach here or if I’m missing something. Thanks in advance!


09/29/2022, 1:09 PM
There are a few approaches. One is to do what you're saying, an on/off flag for the feature and a separate flag for permissions. Another approach is using a single string feature with multiple values "off", "full access", "partial access", etc. Or you could use a JSON feature flag and encode permissions in a JSON object.


09/30/2022, 4:37 PM
thanks this is super helpful! JSON feature sounds like a good way to go here.