Add a setting to see if legaldocs are mandatory

This commit is contained in:
Alex Sherman 2020-07-01 16:59:17 +05:00
parent f7994e599a
commit a80e813632
5 changed files with 37 additions and 3 deletions

View file

@ -4,7 +4,11 @@ module Concerns
extend ActiveSupport::Concern
def legaldoc_mandatory?
!legaldoc_optout
!legaldoc_not_mandatory?
end
def legaldoc_not_mandatory?
legaldoc_optout || !Setting.legal_document_is_mandatory
end
end
end