1. Marcin Kuzminski
  2. RhodeCode

Issues

Issue #663 resolved

Admin/permission: specify default repogroup perms (patch)

Vincent Caron
created an issue

Hello,

I was in the need of having a defaut repogroup permission different than 'group.read' when creating them, when I realized by looking at the code that it was already possible but not exposed via the admin interface. The user model neither provided a default 'group.' permission.

Attached is a patch against RhodeCode 1.4.4 which implements that. It does a little refactoring like renaming 'default_perm' as 'default_repo_perm' in order not to be confused with the new 'default_group_perm'.

Warning : there is no DB migration to add the new default user permission ('group.read'), because I suck at Pylons. I tested my patch by running the following hack:

insert into user_to_perm (user_id, permission_id) values(1,5);

Warning2: I think a few i18n entries are missing, I just realized it while writing this very ticket.

Comments (4)

  1. Vincent Caron reporter

    Concerning i18n, there is only one new string in this patch : en: 'Repository group permission' fr: 'Permissions du groupe de dépôts' * pt: 'Permissão de grupo de repositórios'

  2. Marcin Kuzminski repo owner

    Thanks for the patch ! I'll review this later today, and merge with beta branch soon.

    on a side note, french translations needs a review since i think it's out of sync now. Do you have time to take a look at it ?

    Cheers

  3. Vincent Caron reporter

    on a side note, french translations needs a review since i think it's out of sync now. Do you have time to take a look at it ?

    Sure, assign me a ticket for this. And in the mean time I found i18n/how_to, so I should handle this fine now :)

  4. Marcin Kuzminski repo owner

    I implemented this in beta now. Additionally added new separate checkbox for the group permission, created migration that adds this new default permission. Thanks for your work !

  5. Log in to comment