def enforce(context, action, target, do_raise=True, exc=None):
    init()
    credentials = context.to_dict()
    if not exc:
        exc = exception.PolicyNotAuthorized
    try:
        result = _ENFORCER.enforce(action, target, credentials,
                                   do_raise=do_raise, exc=exc, action=action)
    except Exception:
        credentials.pop('auth_token', None)
        with excutils.save_and_reraise_exception():
            LOG.debug('Policy check for %(action)s failed with credentials '
                      '%(credentials)s',
                      {'action': action, 'credentials': credentials})
    return result
This sets up the remote-activated options we allow for this protocol.
dataset/ETHPy150Open BU-NU-CLOUD-SP16/Trusted-Platform-Module-nova/nova/policy.py/enforce--crossover with--dataset/ETHPy150Open evennia/evennia/evennia/server/portal/telnet.py/TelnetProtocol.enableRemote