wiki:SvnAuthzAdminPlugin

Version 8 (modified by anonymous, 16 years ago) (diff)

patch not working

Svnauthz File Administration Plugin

Description

This plugin registers a module into the WebAdmin to allow the configuration of the svnauthz file from the web inferface. It uses the AccountManager plugin to present the list of users.

The development of this plugin was sponsored by EU Edge LLC

Bugs/Feature Requests

Existing bugs and feature requests for SvnAuthzAdminPlugin are here.

If you have any issues, create a new ticket.

Download

Download the zipped source from [download:svnauthzadminplugin here].

Source

You can check out SvnAuthzAdminPlugin from here using Subversion, or browse the source with Trac.

Example

It uses the authz_file setting from the [trac] section of trac.ini to find the svnauthz file. Currently it only supports svnauthz files without the repository prefix, so the authz_module_name setting in trac.ini should be left empty (this means you have to specify the complete path from the root of the filesystem). Remember to enable the

svnauthz.* = enabled 

parameter in the components part of the trac.ini The following screenshot shows the plugin in action:

Screenshot of SvnAuthzAdminPlugin

Recent Changes

16825 by rjollos on 2017-09-24 06:49:34
SvnAuthzAdminPlugin 1.0dev: Add file missing from r16822

Refs #13118.

16822 by rjollos on 2017-09-24 05:56:11
SvnAuthzAdminPlugin 1.0dev: Add extension point for changes to authz file

The design should be reconsidered after implementing a similar
change listener for the Configuration class (trac:#11339).

Refs #13118.

16236 by rjollos on 2017-02-12 23:07:49
1.0dev: Adapt to Trac 1.2 location of authz_file
(more)

Author/Contributors

Author: kisg
Contributors:

To use in Trac v0.11

  1. Install ClearSilver template system
  2. Download SvnAuthzAdminPlugin v0.1
  3. Unzip and apply the following patch, download it here:
    diff -u --recursive SvnAuthzAdminPlugin-0.1.1/svnauthz/admin_ui.py svnauthzadminplugin/0.10/svnauthz/admin_ui.py
    --- SvnAuthzAdminPlugin-0.1.1/svnauthz/admin_ui.py      2008-07-04 19:47:27.000000000 +0800
    +++ svnauthzadminplugin/0.10/svnauthz/admin_ui.py       2007-07-31 12:47:46.000000000 +0800
    @@ -4,7 +4,7 @@
     
     from trac.util import sorted
     from trac.config import Option
    -from trac.admin import IAdminPanelProvider
    +from webadmin.web_ui import IAdminPageProvider
     
     from model import *
     from io import *
    @@ -24,7 +24,7 @@
     
     class SvnAuthzAdminPage(Component):
     
    -    implements(IAdminPanelProvider, ITemplateProvider)
    +    implements(IAdminPageProvider, ITemplateProvider)
     
         def __init__(self):
             self.authz_file = self.env.config.get("trac", "authz_file")
    @@ -34,7 +34,7 @@
             self.account_manager = AccountManager(self.env)
     
         # IAdminPageProvider
    -    def get_admin_panels(self, req):
    +    def get_admin_pages(self, req):
             if req.perm.has_permission('TRAC_ADMIN'):
                 yield ('subversion', 'Subversion', 'svnauthz', 'Subversion Access')
     
    Only in SvnAuthzAdminPlugin-0.1.1/svnauthz: admin_ui.pyc
    Only in SvnAuthzAdminPlugin-0.1.1/svnauthz: __init__.pyc
    Only in SvnAuthzAdminPlugin-0.1.1/svnauthz: io.pyc
    Only in SvnAuthzAdminPlugin-0.1.1/svnauthz: model.pyc
    diff -u --recursive SvnAuthzAdminPlugin-0.1.1/svnauthz/templates/admin_authz.cs svnauthzadminplugin/0.10/svnauthz/templates/admin_authz.cs
    --- SvnAuthzAdminPlugin-0.1.1/svnauthz/templates/admin_authz.cs 2008-07-04 19:47:27.000000000 +0800
    +++ svnauthzadminplugin/0.10/svnauthz/templates/admin_authz.cs  2007-07-10 13:10:54.000000000 +0800
    @@ -1,13 +1,5 @@
     <h2>Manage Subversion Access Rights</h2>
    -<?cs def:hdf_select(options, name, selected, optional) ?>
    - <select size="1" id="<?cs var:name ?>" name="<?cs var:name ?>"><?cs
    -  if:optional ?><option></option><?cs /if ?><?cs
    -  each:option = options ?>
    -   <option<?cs if:option == selected ?> selected="selected"<?cs /if ?>><?cs
    -     var:option ?></option><?cs
    -  /each ?>
    - </select><?cs
    -/def?>
    +
     
     <?cs if editgroup.name ?>
     <form id="addgroupmember" class="addnew" method="post">
    
  4. Enjoy it. Any question, concat formalin14(at)gmail(dot)com

The above patch doesn't work for me on trac 0.11stable-r7536. But in this ticket you can find a working one: #2612

Attachments (1)

Download all attachments as: .zip