Modify

Opened 13 years ago

Closed 13 years ago

Last modified 13 years ago

#8165 closed enhancement (fixed)

Plugin does not support v0.12 multiple repositories

Reported by: dmcr@… Owned by: Ryan J Ollos
Priority: normal Component: SvnAuthzAdminPlugin
Severity: normal Keywords:
Cc: Trac Release: 0.12

Description

In Trac v0.12, multiple repositories are supported for a project, either via the trac.ini [repositories] section, or via the database. However, this plugin, only supports the single repository specified by the authz_module_name parameter when show_all_repos is set to false.

In situations, such as ours, where the svn authz_file supports repositories for multiple trac projects, we don't want the admin of one project to see information about repos belonging to other projects, so we need to set show_all_repos to false. However, if a given project is associated with, say, 2 repositories, then only the access to one can be controlled by this plugin, since it only looks at authz_module_name to see which repo belongs to this project.

To properly support v0.12, it would be necessary for this plugin to recognize all repos belonging to this project, by looking at the [repositories] section of trac.ini and in the repository table for this project's database.

Thanks,

Dennis

Attachments (1)

svnauthzadminplugin_r8887.patch (18.5 KB) - added by Dennis McRitchie <dmcr@…> 13 years ago.
Implements the changes for ticket #8165

Download all attachments as: .zip

Change History (17)

comment:1 Changed 13 years ago by Ryan J Ollos

Resolution: duplicate
Status: newclosed

Duplicate of #5484.

comment:2 Changed 13 years ago by dmcr@…

Resolution: duplicate
Status: closedreopened

Reopening because this is not a duplicate of #5484. #5484 supports showing all repositories, *regardless* of who they belong to (as does the 'show_all_repos" feature).

This ticket requests the support of multiple repositories owned by the executing project. Trac 0.12 supports such multiple repositories, and information about them is stored in the database, and in the [repositories] section of the trac.ini file. The authz_module_name parameter (used by this plugin) is now deprecated.

comment:3 in reply to:  2 Changed 13 years ago by Ryan J Ollos

Replying to dmcr@Princeton.EDU:

Reopening because this is not a duplicate of #5484. #5484 supports showing all repositories, *regardless* of who they belong to (as does the 'show_all_repos" feature).

Thanks for clearing that up. Any interest in working together to get this plugin working again?

comment:4 Changed 13 years ago by dmcr@…

I would be interested, because it's a very nice interface, and a useful feature. However, after I submitted this ticket, I realized that it has a more serious problem when used in non-show_all_repos mode: there is a race condition, as described by ticket #5664.

So the upshot is that this plugin works great as is in 'show_all_repos' mode, and this is true whether you have repos belonging to different Trac projects in one SVN authz file or not. In our case, since we do have repos for multiple projects in the same SVN authz file, we are installing this plugin as a private plugin as part of an administrative Trac project. So only that project will have access to all repos.

But the ideal would be to have the admin of each Trac project support all the repos that belong to that project, but, of course, without a race condition. So for our purposes, just fixing the issue I raised in this ticket is no longer enough. Both changes are needed to make this a viable approach.

If you think fixing both is feasible, then I'm game, though with limited time.

Dennis

comment:5 in reply to:  4 Changed 13 years ago by Ryan J Ollos

Replying to dmcr@Princeton.EDU:

If you think fixing both is feasible, then I'm game, though with limited time.

Thanks. It's not a high priority for me, but something I'd like to spend time on in within the next year. I hope to be in touch at some point again when I find the time. See #8292.

comment:6 Changed 13 years ago by Dennis McRitchie <dmcr@…>

OK, I fixed the initial complaint of this ticket, and added a number of other enhancements. I provided a patch for these changes built against the latest plugin code.

1) Now uses v0.12 RepositoryManager to retrieve the list of repos associated with this project. When show_all_repos is false, only these repos will be displayed.

2) Now requires v0.12 or later to install.

3) Supports new read_only_display option so as to provide users a view into their svn permissions without letting them change the authz_file. This is necessary because of the race condition described by ticket #5664.

4) Supports an input text box to supplement the drop-down list when adding members to groups or repos. Needed for situations where access is being given to users that are not users of the Trac project.

5) Now sorts the lists of groups and repos in a case-insensitive manner. Helpful when the list is very long, and one forgets that there is a second list starting with lower-case letters.

6) Now sorts the lists of group and repo members.

7) Fixed bug where the *:/ repo was sometimes not displayed first.

8) Defines the 2 supported options with defaults and description strings within the plugin. This allows them to be easily displayed and modified via the "trac.ini Editor" plugin or other similar tools, and avoids the need for editing trac.ini manually.

9) Now displays this plugin under the Version Control section of the admin interface menu.

10) Revved package version to 0.2

Once #5664 is fixed, this should be a very useful product, because then users can change their own svn permissions.

Dennis

Changed 13 years ago by Dennis McRitchie <dmcr@…>

Implements the changes for ticket #8165

comment:7 Changed 13 years ago by Dennis McRitchie <dmcr@…>

Resolution: fixed
Status: reopenedclosed

Note that when you click on the attachment, the numerous changes to admin_ui.py don't show up at all. But they're in the file if you download it in its original mode.

comment:8 Changed 13 years ago by Ryan J Ollos

Resolution: fixed
Status: closedreopened

I'll commit your patch to the repository this evening.

comment:9 Changed 13 years ago by Ryan J Ollos

Owner: changed from Kis Gergely to Ryan J Ollos
Status: reopenednew

comment:10 Changed 13 years ago by Ryan J Ollos

Status: newassigned

comment:11 Changed 13 years ago by Dennis McRitchie <dmcr@…>

Should probably be committed to a 0.12 subfolder, since this won't work with Trac 0.11.

Dennis

comment:12 Changed 13 years ago by Ryan J Ollos

(In [10611]) Refs #8165: Creating a 0.12 branch.

comment:13 Changed 13 years ago by Ryan J Ollos

Added you to list of contributors on the project's wiki page, tagged the project as needsadoption since no response from author, and added 0.12 tag to the wiki page.

comment:14 Changed 13 years ago by Ryan J Ollos

The patch applied cleanly to the new 0.12 branch. I haven't tested this. If you have a chance to checkout from the trunk and make sure the egg builds and installs correctly, that would be a nice check to do.

comment:15 Changed 13 years ago by Ryan J Ollos

Resolution: fixed
Status: assignedclosed

(In [10612]) Fixes #8165: Applied patch from Dennis McRitchie.

1) Now uses v0.12 RepositoryManager? to retrieve the list of repos associated with this project. When show_all_repos is false, only these repos will be displayed.

2) Now requires v0.12 or later to install.

3) Supports new read_only_display option so as to provide users a view into their svn permissions without letting them change the authz_file. This is necessary because of the race condition described by ticket #5664.

4) Supports an input text box to supplement the drop-down list when adding members to groups or repos. Needed for situations where access is being given to users that are not users of the Trac project.

5) Now sorts the lists of groups and repos in a case-insensitive manner. Helpful when the list is very long, and one forgets that there is a second list starting with lower-case letters.

6) Now sorts the lists of group and repo members.

7) Fixed bug where the *:/ repo was sometimes not displayed first.

8) Defines the 2 supported options with defaults and description strings within the plugin. This allows them to be easily displayed and modified via the "trac.ini Editor" plugin or other similar tools, and avoids the need for editing trac.ini manually.

9) Now displays this plugin under the Version Control section of the admin interface menu.

10) Revved package version to 0.2 

comment:16 Changed 13 years ago by Dennis McRitchie <dmcr@…>

Thanks for noting me as contributor.

Will check out the new commit, and report back.

Dennis

Modify Ticket

Change Properties
Set your email in Preferences
Action
as closed The owner will remain Ryan J Ollos.
The resolution will be deleted. Next status will be 'reopened'.

Add Comment


E-mail address and name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.