Add a decorator that makes a view require a feature
Review Request #9007 — Created June 9, 2017 and submitted — Latest diff uploaded
Information | |
---|---|
brennie | |
Djblets | |
release-0.10.x | |
Reviewers | |
djblets | |
The
@feature_required(f)
decorator makes the decorated view require
thef
feature to be enabled to be executed. Otherwise a backup view
will be called, which by default returns a 404 Not Found error. This
view may be customized by the caller to return any sort of response.
- Tested this with an upcoming patch for RB.
- Ran unit tests.