Introduce 'has_subscription' role with 'can-renew-subscription' capability
This is in preparation of presenting different messages to users, when their subscription should be renewed, or when they should buy a (new) subscription.
This commit is contained in:
@@ -12,8 +12,12 @@ ROLES_TO_BE_SUBSCRIBER = {'demo', 'subscriber', 'admin'} # TODO: get rid of thi
|
|||||||
|
|
||||||
class CloudExtension(PillarExtension):
|
class CloudExtension(PillarExtension):
|
||||||
has_context_processor = True
|
has_context_processor = True
|
||||||
user_roles = {'subscriber-pro'}
|
user_roles = {'subscriber-pro', 'has_subscription'}
|
||||||
user_roles_indexable = {'subscriber-pro'}
|
user_roles_indexable = {'subscriber-pro', 'has_subscription'}
|
||||||
|
|
||||||
|
user_caps = {
|
||||||
|
'has_subscription': {'can-renew-subscription'},
|
||||||
|
}
|
||||||
|
|
||||||
def __init__(self):
|
def __init__(self):
|
||||||
self._log = logging.getLogger('%s.CloudExtension' % __name__)
|
self._log = logging.getLogger('%s.CloudExtension' % __name__)
|
||||||
|
Reference in New Issue
Block a user