conf agreement parameter checker added

This commit is contained in:
volkansahin 2017-07-18 10:06:26 +03:00
parent 2285832b9d
commit fe2856d3d0

View file

@ -72,7 +72,7 @@ class CommandRunner(object):
agreement = Agreement()
agreement_choice = None
if agreement.check_agreement(username) is not True:
if agreement.check_agreement(username) is not True and System.Ahenk.agreement() == '1':
self.logger.debug('User {0} has not accepted agreement.'.format(username))
thread_ask = Process(target=agreement.ask, args=(username, display,))
thread_ask.start()
@ -110,7 +110,7 @@ class CommandRunner(object):
else:
agreement_choice = True
if agreement_choice is True:
if agreement_choice is True or System.Ahenk.agreement() != '1':
self.db_service.delete('session', 'username=\'{0}\''.format(username))
self.logger.info(