disqus / gargoyle

Feature switches in Django
http://engineering.disqus.com
Apache License 2.0
748 stars 112 forks source link

Switches based on fields in a user profile #66

Closed marcesher closed 11 years ago

marcesher commented 11 years ago

Is it possible to create switches based on properties in a custom user_profile model? For example, our profile model has a "Division" property: think "marketing", "sales", etc. And we'd like to enable features for specific divisions.

If this functionality isn't available, could you provide guidance on implementing such a feature? I'd be willing to contribute, if I can.

Thanks.

dcramer commented 11 years ago

This is pretty easy. Just take a look at the existing condition sets and you'll see how to set it up

marcesher commented 11 years ago

@dcramer Thanks for responding... but I'm still confused. I don't see any documentation around this, and nothing obvious jumps out in the admin UI.

dcramer commented 11 years ago

http://gargoyle.readthedocs.org/en/latest/ref/conditions.html

You'll have to dig in the source code for examples

On Tuesday, April 30, 2013 at 12:15 PM, Marc Esher wrote:

@dcramer (https://github.com/dcramer) Thanks for responding... but I'm still confused. I don't see any documentation around this, and nothing obvious jumps out in the admin UI.

— Reply to this email directly or view it on GitHub (https://github.com/disqus/gargoyle/issues/66#issuecomment-17248218).