https://www.growthbook.io/ logo
#announcements
Title
# announcements
b

big-gigabyte-81438

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!
f

future-teacher-7046

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.
b

big-gigabyte-81438

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