Edgewall Software
Modify

Opened 20 years ago

Closed 20 years ago

#1365 closed defect (fixed)

[patch] repo browser ignores authz

Reported by: Matthew Good <trac matt-good net> Owned by: Jonas Borgström
Priority: normal Milestone: 0.9
Component: version control/browser Version: devel
Severity: major Keywords:
Cc: Branch:
Release Notes:
API Changes:
Internal Changes:

Description

The browser doesn't pass in the username for the authorization so it gets ignored.

=== trac/Browser.py
==================================================================
--- trac/Browser.py  (revision 1841)
+++ trac/Browser.py  (local)
@@ -72,7 +72,7 @@
         if len(path_links) > 1:
             add_link(req, 'up', path_links[-2]['href'], 'Parent directory')

-        repos = self.env.get_repository()
+        repos = self.env.get_repository(req.authname)
         req.hdf['browser.revision'] = rev or repos.youngest_rev

         node = repos.get_node(path, rev)
@@ -218,7 +218,7 @@
         if path_links:
             add_link(req, 'up', path_links[-1]['href'], 'Parent directory')

-        repos = self.env.get_repository()
+        repos = self.env.get_repository(req.authname)
         node = repos.get_node(path, rev)
         if not node:
             # FIXME: we should send a 404 error here

Attachments (0)

Change History (1)

comment:1 by Christopher Lenz, 20 years ago

Resolution: fixed
Status: newclosed

Patch applied in [1449]. Thanks!

Modify Ticket

Change Properties
Set your email in Preferences
Action
as closed The owner will remain Jonas Borgström.
The resolution will be deleted. Next status will be 'reopened'.
to The owner will be changed from Jonas Borgström to the specified user.

Add Comment


E-mail address and name can be saved in the Preferences .
 
Note: See TracTickets for help on using tickets.