Exemplo n.º 1
0
    def init():
        from veil.frontend.web import register_website_context_manager
        from veil.frontend.visitor import enable_user_tracking
        from tgcaem.feature.teacher import is_from_unauthorized_ips

        register_website_context_manager('teacher', enable_user_tracking('teacher', login_url='/login',
            is_session_ttl_enabled=is_from_unauthorized_ips, session_cookie_on_parent_domain=False))
Exemplo n.º 2
0
    def init():
        from veil.frontend.web import register_website_context_manager
        from veil.frontend.visitor import enable_visitor_origin_tracking
        from cmcloud.website.sharelet.user import set_current_student_on_request

        register_website_context_manager('student',
                                         enable_visitor_origin_tracking())
        register_website_context_manager(
            'student', enable_user_tracking('student', login_url='/login'))
        register_website_context_manager('student',
                                         set_current_student_on_request)
Exemplo n.º 3
0
    def init():
        from veil.frontend.template import import_widget
        from veil.frontend.web import register_website_context_manager
        from veil.frontend.visitor import enable_user_tracking
        from tgcaem.feature.operator import is_from_unauthorized_ips
        from .operator_website import operator_profile_widget

        import_widget(operator_profile_widget)

        register_website_context_manager('operator', enable_user_tracking('operator', login_url='/login',
            is_session_ttl_enabled=is_from_unauthorized_ips, session_cookie_on_parent_domain=False))
Exemplo n.º 4
0
    def init():
        from veil.frontend.web import register_website_context_manager
        from veil.frontend.visitor import enable_user_tracking

        register_website_context_manager('collector', enable_user_tracking('collector', session_ttl=timedelta(days=10)))