Skip to content

Commit

Permalink
Merge pull request #90 from k4rl85/fix_register_after_login
Browse files Browse the repository at this point in the history
Deny modification to user data in daemon after authentication.
  • Loading branch information
k4rl85 committed Dec 1, 2014
2 parents ec2b34c + 19266c4 commit c8827c5
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions client/client_daemon.py
Original file line number Diff line number Diff line change
Expand Up @@ -1036,11 +1036,12 @@ def start(self):

if not self.cfg.get('activate'):
response = self._activation_check(s, cmd, data)
elif cmd == 'login':
response = {'content': 'Warning! There is a user already authenticated on this '
'computer. Impossible to login account',
# this elif avoid to modify user after authenticate daemon
elif cmd in Daemon.ALLOWED_OPERATION:
response = {'content': 'Warning! User already authenticated! '
'Impossible to execute {} on this computer.\n'
'If you want {} you must delete local user configuration.'.format(cmd),
'successful': False}

else: # client is already activated
try:
response = self.INTERNAL_COMMANDS[cmd](data)
Expand Down

0 comments on commit c8827c5

Please sign in to comment.