# -*- coding: utf-8 -*- from collections import OrderedDict from gluon import current from gluon.storage import Storage def config(settings): T = current.T # Pre-Populate # http://eden.sahanafoundation.org/wiki/DeveloperGuidelines/PrePopulate # Configure/disable pre-population of the database. # To pre-populate the database On 1st run should specify directory(s) in # /modules/templates/ # eg: # ["default"] (1 is a shortcut for this) # ["default", "default/users"] # Unless doing a manual DB migration, where prepopulate = 0 # In Production, prepopulate = 0 (to save 1x DAL hit every page) settings.base.prepopulate.append("Spotter") # Uncomment this to prefer scalability-optimized strategies globally #settings.base.bigtable = True # Theme (folder to use for views/layout.html) #settings.base.theme = "default" # Enable Guided Tours #settings.base.guided_tour = True # Authentication settings # These settings should be changed _after_ the 1st (admin) user is # registered in order to secure the deployment # Should users be allowed to register themselves? #settings.security.self_registration = False # Do new users need to verify their email address? #settings.auth.registration_requires_verification = True # Do new users need to be approved by an administrator prior to being able to login? #settings.auth.registration_requires_approval = True # Disable welcome-emails to newly registered users #settings.auth.registration_welcome_email = False # Allow a new user to be linked to a record (and a new record will be created if it doesn't already exist) settings.auth.registration_link_user_to = {"staff":T("Staff"), "volunteer":T("Volunteer"), "member":T("Member")} # Always notify the approver of a new (verified) user, even if the user is automatically approved #settings.auth.always_notify_approver = False # The name of the teams that users are added to when they opt-in to receive alerts #settings.auth.opt_in_team_list = ["Updates"] # Uncomment this to set the opt in default to True #settings.auth.opt_in_default = True # Uncomment this to request the Home Phone when a user registers settings.auth.registration_requests_home_phone = True # Uncomment this to request the Mobile Phone when a user registers settings.auth.registration_requests_mobile_phone = True # Uncomment this to have the Mobile Phone selection during registration be mandatory #settings.auth.registration_mobile_phone_mandatory = True # Uncomment this to request the Organisation when a user registers settings.auth.registration_requests_organisation = True # Uncomment this to have the Organisation selection during registration be mandatory settings.auth.registration_organisation_required = True # Uncomment this to hide the Create-Organisation link in registration forms #settings.auth.registration_organisation_link_create = False # Uncomment this to have the Organisation input hidden unless the user enters a non-whitelisted domain #settings.auth.registration_organisation_hidden = True # Uncomment this to default the Organisation during registration settings.auth.registration_organisation_default = "My Organisation" # Uncomment this to request the Organisation Group when a user registers #settings.auth.registration_requests_organisation_group = True # Uncomment this to have the Organisation Group selection during registration be mandatory #settings.auth.registration_organisation_group_required = True # Uncomment this to request the Site when a user registers #settings.auth.registration_requests_site = True # Uncomment this to allow Admin to see Organisations in User Admin even if the Registration doesn't request this #settings.auth.admin_sees_organisation = True # Uncomment to set the default role UUIDs assigned to newly-registered users # This is a dictionary of lists, where the key is the realm that the list of roles applies to # The key 0 implies not realm restricted # The keys "organisation_id" and "site_id" can be used to indicate the user's "organisation_id" and "site_id" #settings.auth.registration_roles = { 0: ["STAFF", "PROJECT_EDIT"]} # Whether the first user to register for an Org should get the ORG_ADMIN role for that Org settings.auth.org_admin_to_first = True # Define which entity types to use as realm entities in role manager settings.auth.realm_entity_types = ("org_organisation",) # Uncomment to activate entity role manager tabs for OrgAdmins settings.auth.entity_role_manager = True # Define modules for entity role manager #settings.auth.role_modules = OrderedDict([]) # Define access levels for entity role manager #settings.auth.access_levels = OrderedDict([]) # Uncomment this to enable record approval settings.auth.record_approval = True # Uncomment this and specify a list of tablenames for which record approval is required settings.auth.record_approval_required_for = ("cap_alert",) settings.auth.record_approval_manual = ("cap_alert",) # Uncomment this to request an image when users register #settings.auth.registration_requests_image = True # Uncomment this to direct newly-registered users to their volunteer page to be able to add extra details # NB This requires Verification/Approval to be Off # @ToDo: Extend to all optional Profile settings: Homepage, Twitter, Facebook, Mobile Phone, Image #settings.auth.registration_volunteer = True # Terms of Service to be able to Register on the system # https://termsfeed.com/terms-conditions/generator/ # uses