cannot add permissions to a group of a repository

Issue #202 resolved
sbarcteam created an issue

added a repository, it is completely indexed already. defined groups. wanted to add a group to writers via "Permissions". For one particular repository I simply cannot add a group to the permissions.

when filling in the name of a group - I get completion (the group name is found), I then chose "write" radio button, and press "Save". the result is: "- error occurred during update of repository shared/amb"

(context: shared/amb is the repo inside a group of repos. "shared" are common repos with group based push permissions, and "personal" are forks/personal repos when the push permissions by default are user based - developers' forks)

Please help me with this one or tell me how to debug. I am not familiar with pylons/paster/etc. I looked at the code (repos.py, line 237), and I tried to print out the result_form variable to see what we have there via log.error("form is: %s" % result_form) but there was nothing in the log.

trying

Comments (3)

  1. Marcin Kuzminski repo owner

    change the log levels to DEBUG in the .ini file for now to see the detailed output.

    I'll try to write some test cases for that to find a problem.

  2. sbarcteam reporter

    I have the error in the log as:

    IntegrityError: (IntegrityError) duplicate key value violates unique constraint "users_group_repo_to_perm_users_group_id_key"
     'INSERT INTO users_group_repo_to_perm (users_group_id, permission_id, repository_id) VALUES (%(users_group_id)s, %(permission_id)s, %(repository_id)s) RETURNING users_group_repo_to_perm.users_group_to_perm_id' {'repository_id': 4, 'users_group_id': 1, 'permission_id': 3}
    
  3. Log in to comment