Source code for collective.smsauthenticator.browser.settings_helper

from zope.i18nmessageid import MessageFactory

from plone import api

from Products.Five import BrowserView

from collective.smsauthenticator.helpers import (
    is_two_step_verification_globally_enabled, has_enabled_two_step_verification
    )

_ = MessageFactory('collective.smsauthenticator')

[docs]class SettingsHelper(BrowserView): """ Helper view for accessing some conditions from portal actions (actions.xml). """ def __init__(self, context, request): self.context = context self.request = request
[docs] def is_two_step_verification_globally_enabled(self): """ Disable the two-step verification for the user and redirect back to the `@@personal-information`. """ return is_two_step_verification_globally_enabled()