adds Setting: minimum age to participate
This commit is contained in:
@@ -196,6 +196,10 @@ class User < ActiveRecord::Base
|
||||
@@username_max_length ||= self.columns.find { |c| c.name == 'username' }.limit || 60
|
||||
end
|
||||
|
||||
def self.minimum_required_age
|
||||
(Setting['min_age_to_participate'] || 16).to_i
|
||||
end
|
||||
|
||||
def show_welcome_screen?
|
||||
sign_in_count == 1 && unverified? && !organization && !administrator?
|
||||
end
|
||||
|
||||
@@ -37,3 +37,4 @@ en:
|
||||
meta_description: "Site description (SEO)"
|
||||
meta_keywords: "Keywords (SEO)"
|
||||
verification_offices_url: Verification offices URL
|
||||
min_age_to_participate: Minimum age needed to participate
|
||||
|
||||
@@ -37,3 +37,4 @@ es:
|
||||
meta_description: "Descripción del sitio (SEO)"
|
||||
meta_keywords: "Palabras clave (SEO)"
|
||||
verification_offices_url: URL oficinas verificación
|
||||
min_age_to_participate: Edad mínima para participar
|
||||
|
||||
@@ -94,3 +94,4 @@ Setting['mailer_from_address'] = 'noreply@consul.dev'
|
||||
|
||||
# Verification settings
|
||||
Setting['verification_offices_url'] = 'http://oficinas-atencion-ciudadano.url/'
|
||||
Setting['min_age_to_participate'] = 16
|
||||
|
||||
Reference in New Issue
Block a user