Edgewall Software

source: trunk/cgi-bin/svntrac_auth.cgi@ 1

Last change on this file since 1 was 1, checked in by Jonas Borgström, 20 years ago

Initial import

  • Property svn:executable set to *
File size: 1.3 KB
Line 
1#!/usr/bin/env python
2#
3# svntrac
4#
5# Copyright (C) 2003 Xyche Software
6#
7# svntrac is free software; you can redistribute it and/or
8# modify it under the terms of the GNU General Public License as
9# published by the Free Software Foundation; either version 2 of the
10# License, or (at your option) any later version.
11#
12# svntrac is distributed in the hope that it will be useful,
13# but WITHOUT ANY WARRANTY; without even the implied warranty of
14# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
15# General Public License for more details.
16#
17# You should have received a copy of the GNU General Public License
18# along with this program; if not, write to the Free Software
19# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
20#
21# Author: Jonas Borgström <jonas@xyche.com>
22
23import os
24import cgi
25import cgitb; cgitb.enable()
26import ConfigParser
27
28import svntrac.db
29from svntrac.util import *
30from svntrac.auth import authenticate_user
31
32if __name__ == '__main__':
33 if not os.getenv('REMOTE_USER'):
34 print 'Content-Type: text/html\r\n\r\n',
35 print ('<html><body><pre>'
36 'svntrac missconfigured, please enable apache auth on this url'
37 '</pre></body></html>')
38 else:
39 config = svntrac.load_config()
40 svntrac.db.init (config)
41 authenticate_user ()
42 redirect (menu_href ())
43
Note: See TracBrowser for help on using the repository browser.