Modify

Opened 7 years ago

Closed 5 years ago

#2612 closed enhancement (fixed)

Port of SvnAuthzAdminPlugin to 0.11

Reported by: danimo Owned by: kisg
Priority: normal Component: SvnAuthzAdminPlugin
Severity: normal Keywords: 0.11, port
Cc: Trac Release: 0.11

Description

During a project for university we have ported SvnAuthzAdminPlugin to trac 0.11. Attached is the diff to the latest Version for 0.10:

Major changes:

  • Adjustments to 0.11 API
  • Ported Templates to Genshi
  • Removed dependency on AccountManager plugin (used 0.11 admin infrastructure instead)

This patch probably needs some cleanups, but works for us (tm).

Attachments (4)

svnauthzadminplugin_for_trac0.11.diff (29.2 KB) - added by danimo 7 years ago.
revisedPatch.diff (16.3 KB) - added by gkruse@… 7 years ago.
Fixed r/w checkboxes
revisedPatch.2.diff (29.2 KB) - added by gkruse@… 7 years ago.
Fixed r/w checkboxes (forgot the critical section)
fix-checkboxes.diff (1.4 KB) - added by olaf.meeuwissen@… 6 years ago.
isolated R/W checkbox fix in separate patch

Download all attachments as: .zip

Change History (16)

Changed 7 years ago by danimo

comment:1 Changed 7 years ago by danimo

  • Summary changed from Port of SvnAuthzAdminPlugin to Port of SvnAuthzAdminPlugin to 0.11
  • Trac Release changed from 0.10 to 0.11

comment:2 Changed 7 years ago by gkruse@…

I tried this patch and it worked beautifully with one exception. The code in the template that decides if the r/w checkboxes are checked or not seems to be broken. This results in both the r and w checkboxes always being checked regardless of the actual permissions. Please see the revised patch for my quick fix, however, I don't know enough genshi to know if this is the best way to fix it or not.

Changed 7 years ago by gkruse@…

Fixed r/w checkboxes

Changed 7 years ago by gkruse@…

Fixed r/w checkboxes (forgot the critical section)

comment:3 Changed 7 years ago by gkruse@…

Please see lines 183-194 of admin_authz.html in revisedPatch.2.diff

Changed 6 years ago by olaf.meeuwissen@…

isolated R/W checkbox fix in separate patch

comment:4 Changed 6 years ago by olaf.meeuwissen@…

I had a look at the three patches and got a bit confused at first. After looking over the patches, I finally figured out what those revised patches were trying to achieve. I've isolated the fixes in a separate patch. Now you can patch the 0.10 sources as follows:

That should fix the checkbox problem without patch complaining all over the place ;-).

comment:5 follow-up: Changed 6 years ago by envertigo

What would I use to merge that diff file? TortoiseSVN doesn't want to apply it.

comment:6 in reply to: ↑ 5 Changed 6 years ago by olaf.meeuwissen@…

Replying to envertigo:

What would I use to merge that diff file? TortoiseSVN doesn't want to apply it.

I have no experience with TortoiseSVN, but I noticed that I may have goofed up the path in the diffs. In order to apply cleanly with patch, you would do:

cd /path/to/svnauthzadminplugin
patch -p0 < svnauthzadminplugin_for_trac0.11.diff
patch -p1 < fix-checkboxes.diff

Note the difference in the number of leading path components that are stripped.

Maybe TortoiseSVN has an option that lets's you specify this? I dunno.

comment:7 Changed 6 years ago by anonymous

  • Type changed from defect to enhancement

Is there an official release for Trac 0.11?

Or, we have to apply patches as others mentioned above?

comment:8 follow-up: Changed 6 years ago by knox

I get the following error and dont know how whats wrong.

ParseError: ParseError: [/var/www/trac/.tmp/SvnAuthzAdminPlugin-0.1-py2.5.egg-tmp/svnauthz/templates/admin_authz.cs:14] Undefined macro called: hdf_select(editgroup.candidates, "subject", "", 0)

comment:9 in reply to: ↑ 8 Changed 6 years ago by anonymous

Replying to knox:

I get the following error and dont know how whats wrong.

Shame on me! I just had to rebuild the egg from patched sources. Sorry for disturbing.

comment:10 follow-up: Changed 6 years ago by anonymous

the path member "*" is missing. there was one patch available for that.

comment:11 in reply to: ↑ 10 Changed 6 years ago by anonymous

Replying to anonymous:

the path member "*" is missing. there was one patch available for that.

See this ticket: #4702. Implementations are more to come...

comment:12 Changed 5 years ago by ThurnerRupert

  • Resolution set to fixed
  • Status changed from new to closed

(In [5405]) SvnAuSvnAuthzAdminPlugin, fix #2612, by applying revisedPatch.2.diff

Add Comment

Modify Ticket

Action
as closed .
The resolution will be deleted. Next status will be 'reopened'.
Author


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

 
Note: See TracTickets for help on using tickets.