diff --git a/rhodecode/apps/ssh_support/lib/backends/__init__.py b/rhodecode/apps/ssh_support/lib/backends/__init__.py --- a/rhodecode/apps/ssh_support/lib/backends/__init__.py +++ b/rhodecode/apps/ssh_support/lib/backends/__init__.py @@ -62,7 +62,8 @@ class SshWrapper(object): key.accessed_on = datetime.datetime.utcnow() Session().add(key) Session().commit() - log.debug('Update key `%s` access time', key_id) + log.debug('Update key id:`%s` fingerprint:`%s` access time', + key_id, key.ssh_key_fingerprint) def get_connection_info(self): """ diff --git a/rhodecode/apps/ssh_support/lib/backends/base.py b/rhodecode/apps/ssh_support/lib/backends/base.py --- a/rhodecode/apps/ssh_support/lib/backends/base.py +++ b/rhodecode/apps/ssh_support/lib/backends/base.py @@ -70,6 +70,11 @@ class VcsServer(object): 'permission for %s on %s are: %s', self.user, self.repo_name, permission) + if not permission: + log.error('user `%s` permissions to repo:%s are empty. Forbidding access.', + self.user, self.repo_name) + return -2 + if action == 'pull': if permission in self.read_perms: log.info( @@ -83,8 +88,8 @@ class VcsServer(object): self.user, self.repo_name) return 0 - log.error('Cannot properly fetch or allow user %s permissions. ' - 'Return value is: %s, req action: %s', + log.error('Cannot properly fetch or verify user `%s` permissions. ' + 'Permissions: %s, vcs action: %s', self.user, permission, action) return -2 diff --git a/rhodecode/templates/admin/my_account/my_account_ssh_keys.mako b/rhodecode/templates/admin/my_account/my_account_ssh_keys.mako --- a/rhodecode/templates/admin/my_account/my_account_ssh_keys.mako +++ b/rhodecode/templates/admin/my_account/my_account_ssh_keys.mako @@ -8,7 +8,8 @@