コード例 #1
0
ファイル: __init__.py プロジェクト: yashodhank/GlobaLeaks
class Context(ModelWithID):
    """
    This model keeps track of contexts settings.
    """
    show_small_receiver_cards = Bool(default=False)
    show_context = Bool(default=True)
    show_recipients_details = Bool(default=False)
    allow_recipients_selection = Bool(default=False)
    maximum_selectable_receivers = Int(default=0)
    select_all_receivers = Bool(default=True)

    enable_comments = Bool(default=True)
    enable_messages = Bool(default=False)
    enable_two_way_comments = Bool(default=True)
    enable_two_way_messages = Bool(default=True)
    enable_attachments = Bool(
        default=True)  # Lets WB attach files to submission
    enable_rc_to_wb_files = Bool(default=False)  # The name says it all folks

    tip_timetolive = Int(validator=range_v(-1, 5 * 365),
                         default=15)  # in days, -1 indicates no expiration

    # localized strings
    name = JSON(validator=shortlocal_v, default={})
    description = JSON(validator=longlocal_v, default={})
    recipients_clarification = JSON(validator=longlocal_v, default={})

    status_page_message = JSON(validator=longlocal_v, default={})

    show_receivers_in_alphabetical_order = Bool(default=False)

    presentation_order = Int(default=0)

    questionnaire_id = Unicode(default=u'')

    img_id = Unicode()

    unicode_keys = ['questionnaire_id']

    localized_keys = [
        'name', 'description', 'recipients_clarification',
        'status_page_message'
    ]

    int_keys = [
        'tip_timetolive', 'maximum_selectable_receivers', 'presentation_order',
        'steps_navigation_requires_completion'
    ]

    bool_keys = [
        'select_all_receivers', 'show_small_receiver_cards', 'show_context',
        'show_recipients_details', 'show_receivers_in_alphabetical_order',
        'allow_recipients_selection', 'enable_comments', 'enable_messages',
        'enable_two_way_comments', 'enable_two_way_messages',
        'enable_attachments', 'enable_rc_to_wb_files'
    ]

    list_keys = ['receivers']
コード例 #2
0
ファイル: config_desc.py プロジェクト: vondrakk/GlobaLeaks
     'enable_proof_of_work':
     Bool(default=True),
     'enable_experimental_features':
     Bool(default=False),
     'simplified_login':
     Bool(default=False),
     'enable_custom_privacy_badge':
     Bool(default=False),
     'landing_page':
     Unicode(default=u'homepage'),
     'show_small_context_cards':
     Bool(default=False),
     'show_contexts_in_alphabetical_order':
     Bool(default=True),
     'wbtip_timetolive':
     Int(validator=range_v(5, 365 * 2), default=90),  # Days
     'threshold_free_disk_megabytes_high':
     Int(validator=natnum_v, default=200),
     'threshold_free_disk_megabytes_low':
     Int(validator=natnum_v, default=1000),
     'threshold_free_disk_percentage_high':
     Int(default=3),
     'threshold_free_disk_percentage_low':
     Int(default=10),
     'context_selector_type':
     Unicode(validator=shorttext_v, default=u'list'),
     'reachable_via_web':
     Bool(default=True),
     'anonymize_outgoing_connections':
     Bool(default=True),
 },
コード例 #3
0
        'default_password': Unicode(validator=longtext_v, default=u'globaleaks'),

        # Advanced settings
        'maximum_namesize': Int(validator=natnum_v, default=128),
        'maximum_textsize': Int(validator=natnum_v, default=4096),
        'maximum_filesize': Int(validator=natnum_v, default=30),
        'tor2web_admin': Bool(default=True),
        'tor2web_custodian': Bool(default=True),
        'tor2web_whistleblower': Bool(default=False),
        'tor2web_receiver': Bool(default=True),
        'tor2web_unauth': Bool(default=True),
        'allow_unencrypted': Bool(default=True),
        'disable_encryption_warnings': Bool(default=False),
        'allow_iframes_inclusion': Bool(default=False),
        'submission_minimum_delay': Int(validator=natnum_v, default=10),
        'submission_maximum_ttl': Int(validator=range_v(10, 10800*5), default=10800), # Seconds

        # privileges of receivers
        'can_postpone_expiration': Bool(default=False),
        'can_delete_submission': Bool(default=False),
        'can_grant_permissions': Bool(default=False),

        'allow_indexing': Bool(default=True),

        'wizard_done': Bool(default=False),

        'disable_submissions': Bool(default=False),
        'disable_privacy_badge': Bool(default=False),
        'disable_security_awareness_badge': Bool(default=False),
        'disable_security_awareness_questions': Bool(default=False),
        'disable_key_code_hint': Bool(default=False),
コード例 #4
0
        'enable_captcha': Bool(default=True),
        'enable_proof_of_work': Bool(default=True),

        'enable_experimental_features': Bool(default=False),

        'simplified_login': Bool(default=True),

        'enable_custom_privacy_badge': Bool(default=False),

        'landing_page': Unicode(default=u'homepage'),

        'show_small_context_cards': Bool(default=False),
        'show_contexts_in_alphabetical_order': Bool(default=False),

        'wbtip_timetolive': Int(validator=range_v(5, 365*2), default=90), # Days

        'threshold_free_disk_megabytes_high': Int(validator=natnum_v, default=200),
        'threshold_free_disk_megabytes_medium': Int(validator=natnum_v, default=500),
        'threshold_free_disk_megabytes_low': Int(validator=natnum_v, default=1000),

        'threshold_free_disk_percentage_high': Int(default=3),
        'threshold_free_disk_percentage_medium': Int(default=5),
        'threshold_free_disk_percentage_low': Int(default=10),

        'context_selector_type': Unicode(validator=shorttext_v, default=u'list'),

        'reachable_via_web': Bool(default=True),
        'anonymize_outgoing_connections': Bool(default=True),
    },
}
コード例 #5
0
     Unicode(validator=shorttext_v, default=salt()),  # is always customized
     'smtp_password':
     Unicode(validator=shorttext_v,
             default=u'yes_you_really_should_change_me'),
     'version':
     Unicode(default=unicode(__version__)),
     'version_db':
     Int(default=DATABASE_VERSION),
     'acme':
     Bool(default=False),
     'acme_accnt_key':
     Unicode(),
     'acme_accnt_uri':
     Unicode(),
     'tor_onion_key':
     Unicode(validators=range_v(820, 825)),  # Limits from txtorcon
     'https_priv_key':
     Unicode(),
     'https_priv_gen':
     Bool(default=False),
     'https_csr':
     Unicode(),
     'https_cert':
     Unicode(),
     'https_chain':
     Unicode(),
     'https_dh_params':
     Unicode(),
     'https_enabled':
     Bool(default=False),
 },
コード例 #6
0
        'tor2web_whistleblower':
        Bool(default=False),
        'tor2web_receiver':
        Bool(default=True),
        'tor2web_unauth':
        Bool(default=True),
        'allow_unencrypted':
        Bool(default=True),
        'disable_encryption_warnings':
        Bool(default=False),
        'allow_iframes_inclusion':
        Bool(default=False),
        'submission_minimum_delay':
        Int(validator=natnum_v, default=10),
        'submission_maximum_ttl':
        Int(validator=range_v(10, 10800 * 5), default=10800),  # Seconds

        # privileges of receivers
        'can_postpone_expiration':
        Bool(default=False),
        'can_delete_submission':
        Bool(default=False),
        'can_grant_permissions':
        Bool(default=False),
        'allow_indexing':
        Bool(default=True),
        'wizard_done':
        Bool(default=False),
        'disable_submissions':
        Bool(default=False),
        'disable_privacy_badge':