Commits

ejucovy  committed 5cd5e87

whoops, that's not how i structured the data

  • Participants
  • Parent commits df57be0

Comments (0)

Files changed (1)

File trac_gitolite/perm_manager.py

                 if user not in perms[repo][perm]:
                     perms[repo][perm].append(user)
 
-            system_user_perms = perms.get(self.gitolite_admin_real_reponame, {}).get(self.gitolite_admin_system_user, [])
-            if 'R' not in system_user_perms or 'W' not in system_user_perms:
+            gitolite_admin_perms = perms.get(self.gitolite_admin_real_reponame, {})
+            if (self.gitolite_admin_system_user not in gitolite_admin_perms.get('R', []) or
+                self.gitolite_admin_system_user not in gitolite_admin_perms.get('W', [])):
                 add_warning(req, _('Read and write permissions on the gitolite admin repo must not be revoked for user %s -- otherwise this plugin will no longer work!' % self.gitolite_admin_system_user))
                 req.redirect(req.href.admin(category, page))