| 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 |
|
|---|
| 23 | import os
|
|---|
| 24 | import cgi
|
|---|
| 25 | import cgitb; cgitb.enable()
|
|---|
| 26 | import ConfigParser
|
|---|
| 27 |
|
|---|
| 28 | import svntrac.db
|
|---|
| 29 | from svntrac.util import *
|
|---|
| 30 | from svntrac.auth import authenticate_user
|
|---|
| 31 |
|
|---|
| 32 | if __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 |
|
|---|