annotate rhodecode/config/routing.py @ 4147:1c8f818787b3 rhodecode-2.2.5-gpl

old style: show the full link box on summary page - no overlap or truncation
author Mads Kiilerich <madski@unity3d.com>
date Wed, 02 Jul 2014 19:03:23 -0400
parents 31e119cb02ef
children 9dd726706178
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
4116
ffd45b185016 Imported some of the GPLv3'd changes from RhodeCode v2.2.5.
Bradley M. Kuhn <bkuhn@sfconservancy.org>
parents: 4043
diff changeset
1 # -*- coding: utf-8 -*-
ffd45b185016 Imported some of the GPLv3'd changes from RhodeCode v2.2.5.
Bradley M. Kuhn <bkuhn@sfconservancy.org>
parents: 4043
diff changeset
2 # This program is free software: you can redistribute it and/or modify
ffd45b185016 Imported some of the GPLv3'd changes from RhodeCode v2.2.5.
Bradley M. Kuhn <bkuhn@sfconservancy.org>
parents: 4043
diff changeset
3 # it under the terms of the GNU General Public License as published by
ffd45b185016 Imported some of the GPLv3'd changes from RhodeCode v2.2.5.
Bradley M. Kuhn <bkuhn@sfconservancy.org>
parents: 4043
diff changeset
4 # the Free Software Foundation, either version 3 of the License, or
ffd45b185016 Imported some of the GPLv3'd changes from RhodeCode v2.2.5.
Bradley M. Kuhn <bkuhn@sfconservancy.org>
parents: 4043
diff changeset
5 # (at your option) any later version.
ffd45b185016 Imported some of the GPLv3'd changes from RhodeCode v2.2.5.
Bradley M. Kuhn <bkuhn@sfconservancy.org>
parents: 4043
diff changeset
6 #
ffd45b185016 Imported some of the GPLv3'd changes from RhodeCode v2.2.5.
Bradley M. Kuhn <bkuhn@sfconservancy.org>
parents: 4043
diff changeset
7 # This program is distributed in the hope that it will be useful,
ffd45b185016 Imported some of the GPLv3'd changes from RhodeCode v2.2.5.
Bradley M. Kuhn <bkuhn@sfconservancy.org>
parents: 4043
diff changeset
8 # but WITHOUT ANY WARRANTY; without even the implied warranty of
ffd45b185016 Imported some of the GPLv3'd changes from RhodeCode v2.2.5.
Bradley M. Kuhn <bkuhn@sfconservancy.org>
parents: 4043
diff changeset
9 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
ffd45b185016 Imported some of the GPLv3'd changes from RhodeCode v2.2.5.
Bradley M. Kuhn <bkuhn@sfconservancy.org>
parents: 4043
diff changeset
10 # GNU General Public License for more details.
ffd45b185016 Imported some of the GPLv3'd changes from RhodeCode v2.2.5.
Bradley M. Kuhn <bkuhn@sfconservancy.org>
parents: 4043
diff changeset
11 #
ffd45b185016 Imported some of the GPLv3'd changes from RhodeCode v2.2.5.
Bradley M. Kuhn <bkuhn@sfconservancy.org>
parents: 4043
diff changeset
12 # You should have received a copy of the GNU General Public License
ffd45b185016 Imported some of the GPLv3'd changes from RhodeCode v2.2.5.
Bradley M. Kuhn <bkuhn@sfconservancy.org>
parents: 4043
diff changeset
13 # along with this program. If not, see <http://www.gnu.org/licenses/>.
604
5cc96df705b9 fixed @repo into :repo for docs
Marcin Kuzminski <marcin@python-works.com>
parents: 547
diff changeset
14 """
5cc96df705b9 fixed @repo into :repo for docs
Marcin Kuzminski <marcin@python-works.com>
parents: 547
diff changeset
15 Routes configuration
0
564e40829f80 initial commit.
Marcin Kuzminski
parents:
diff changeset
16
564e40829f80 initial commit.
Marcin Kuzminski
parents:
diff changeset
17 The more specific and detailed routes should be defined first so they
564e40829f80 initial commit.
Marcin Kuzminski
parents:
diff changeset
18 may take precedent over the more generic routes. For more information
564e40829f80 initial commit.
Marcin Kuzminski
parents:
diff changeset
19 refer to the routes manual at http://routes.groovie.org/docs/
564e40829f80 initial commit.
Marcin Kuzminski
parents:
diff changeset
20 """
4116
ffd45b185016 Imported some of the GPLv3'd changes from RhodeCode v2.2.5.
Bradley M. Kuhn <bkuhn@sfconservancy.org>
parents: 4043
diff changeset
21
371
5cd6616b8673 routes python 2.5 compatible
Marcin Kuzminski <marcin@python-works.com>
parents: 363
diff changeset
22 from __future__ import with_statement
0
564e40829f80 initial commit.
Marcin Kuzminski
parents:
diff changeset
23 from routes import Mapper
1505
bb6ba7442293 Fixed methods for checking if path in routes is a repo
Marcin Kuzminski <marcin@python-works.com>
parents: 1483
diff changeset
24
1333
74aae890d33e refactor of routing to use one common prefix for admin, this way it's easier to change
Marcin Kuzminski <marcin@python-works.com>
parents: 1305
diff changeset
25 # prefix for non repository related links needs to be prefixed with `/`
74aae890d33e refactor of routing to use one common prefix for admin, this way it's easier to change
Marcin Kuzminski <marcin@python-works.com>
parents: 1305
diff changeset
26 ADMIN_PREFIX = '/_admin'
74aae890d33e refactor of routing to use one common prefix for admin, this way it's easier to change
Marcin Kuzminski <marcin@python-works.com>
parents: 1305
diff changeset
27
1205
f4807acf643d added __license__ into main of rhodecode, PEP8ify
Marcin Kuzminski <marcin@python-works.com>
parents: 1203
diff changeset
28
43
2e1247e62c5b changed for pylons 0.1 / 1.0
marcink
parents: 8
diff changeset
29 def make_map(config):
0
564e40829f80 initial commit.
Marcin Kuzminski
parents:
diff changeset
30 """Create, configure and return the routes Mapper"""
1211
a7e7c0fab9db pep8ify
Marcin Kuzminski <marcin@python-works.com>
parents: 1205
diff changeset
31 rmap = Mapper(directory=config['pylons.paths']['controllers'],
4116
ffd45b185016 Imported some of the GPLv3'd changes from RhodeCode v2.2.5.
Bradley M. Kuhn <bkuhn@sfconservancy.org>
parents: 4043
diff changeset
32 always_scan=config['debug'])
1211
a7e7c0fab9db pep8ify
Marcin Kuzminski <marcin@python-works.com>
parents: 1205
diff changeset
33 rmap.minimization = False
a7e7c0fab9db pep8ify
Marcin Kuzminski <marcin@python-works.com>
parents: 1205
diff changeset
34 rmap.explicit = False
1538
27be8f94c207 implements #226 repo groups available by path
Marcin Kuzminski <marcin@python-works.com>
parents: 1507
diff changeset
35
4116
ffd45b185016 Imported some of the GPLv3'd changes from RhodeCode v2.2.5.
Bradley M. Kuhn <bkuhn@sfconservancy.org>
parents: 4043
diff changeset
36 from rhodecode.lib.utils import (is_valid_repo, is_valid_repo_group,
ffd45b185016 Imported some of the GPLv3'd changes from RhodeCode v2.2.5.
Bradley M. Kuhn <bkuhn@sfconservancy.org>
parents: 4043
diff changeset
37 get_repo_by_id)
1538
27be8f94c207 implements #226 repo groups available by path
Marcin Kuzminski <marcin@python-works.com>
parents: 1507
diff changeset
38
604
5cc96df705b9 fixed @repo into :repo for docs
Marcin Kuzminski <marcin@python-works.com>
parents: 547
diff changeset
39 def check_repo(environ, match_dict):
5cc96df705b9 fixed @repo into :repo for docs
Marcin Kuzminski <marcin@python-works.com>
parents: 547
diff changeset
40 """
5cc96df705b9 fixed @repo into :repo for docs
Marcin Kuzminski <marcin@python-works.com>
parents: 547
diff changeset
41 check for valid repository for proper 404 handling
1791
2aee0dc1784e mark all read button for notifications
Marcin Kuzminski <marcin@python-works.com>
parents: 1755
diff changeset
42
604
5cc96df705b9 fixed @repo into :repo for docs
Marcin Kuzminski <marcin@python-works.com>
parents: 547
diff changeset
43 :param environ:
5cc96df705b9 fixed @repo into :repo for docs
Marcin Kuzminski <marcin@python-works.com>
parents: 547
diff changeset
44 :param match_dict:
5cc96df705b9 fixed @repo into :repo for docs
Marcin Kuzminski <marcin@python-works.com>
parents: 547
diff changeset
45 """
1813
a8c66e870bd0 implements #285: Implemented non changeable urls for clone url, and web views
Marcin Kuzminski <marcin@python-works.com>
parents: 1791
diff changeset
46 repo_name = match_dict.get('repo_name')
1538
27be8f94c207 implements #226 repo groups available by path
Marcin Kuzminski <marcin@python-works.com>
parents: 1507
diff changeset
47
3040
ec483ce69ad9 added global fix for stripping multiple slashes from f_path variable
Marcin Kuzminski <marcin@python-works.com>
parents: 3039
diff changeset
48 if match_dict.get('f_path'):
ec483ce69ad9 added global fix for stripping multiple slashes from f_path variable
Marcin Kuzminski <marcin@python-works.com>
parents: 3039
diff changeset
49 #fix for multiple initial slashes that causes errors
ec483ce69ad9 added global fix for stripping multiple slashes from f_path variable
Marcin Kuzminski <marcin@python-works.com>
parents: 3039
diff changeset
50 match_dict['f_path'] = match_dict['f_path'].lstrip('/')
ec483ce69ad9 added global fix for stripping multiple slashes from f_path variable
Marcin Kuzminski <marcin@python-works.com>
parents: 3039
diff changeset
51
4116
ffd45b185016 Imported some of the GPLv3'd changes from RhodeCode v2.2.5.
Bradley M. Kuhn <bkuhn@sfconservancy.org>
parents: 4043
diff changeset
52 by_id_match = get_repo_by_id(repo_name)
ffd45b185016 Imported some of the GPLv3'd changes from RhodeCode v2.2.5.
Bradley M. Kuhn <bkuhn@sfconservancy.org>
parents: 4043
diff changeset
53 if by_id_match:
ffd45b185016 Imported some of the GPLv3'd changes from RhodeCode v2.2.5.
Bradley M. Kuhn <bkuhn@sfconservancy.org>
parents: 4043
diff changeset
54 repo_name = by_id_match
ffd45b185016 Imported some of the GPLv3'd changes from RhodeCode v2.2.5.
Bradley M. Kuhn <bkuhn@sfconservancy.org>
parents: 4043
diff changeset
55 match_dict['repo_name'] = repo_name
1813
a8c66e870bd0 implements #285: Implemented non changeable urls for clone url, and web views
Marcin Kuzminski <marcin@python-works.com>
parents: 1791
diff changeset
56
1507
7d687ed11929 changed check_... functions from their stupid names to something less retarded :)
Marcin Kuzminski <marcin@python-works.com>
parents: 1505
diff changeset
57 return is_valid_repo(repo_name, config['base_path'])
1505
bb6ba7442293 Fixed methods for checking if path in routes is a repo
Marcin Kuzminski <marcin@python-works.com>
parents: 1483
diff changeset
58
bb6ba7442293 Fixed methods for checking if path in routes is a repo
Marcin Kuzminski <marcin@python-works.com>
parents: 1483
diff changeset
59 def check_group(environ, match_dict):
bb6ba7442293 Fixed methods for checking if path in routes is a repo
Marcin Kuzminski <marcin@python-works.com>
parents: 1483
diff changeset
60 """
3416
5706f6ab60cf follow-up on texts missing from 'users groups'/'repositories group' cleanup
Mads Kiilerich <madski@unity3d.com>
parents: 3410
diff changeset
61 check for valid repository group for proper 404 handling
1791
2aee0dc1784e mark all read button for notifications
Marcin Kuzminski <marcin@python-works.com>
parents: 1755
diff changeset
62
1505
bb6ba7442293 Fixed methods for checking if path in routes is a repo
Marcin Kuzminski <marcin@python-works.com>
parents: 1483
diff changeset
63 :param environ:
bb6ba7442293 Fixed methods for checking if path in routes is a repo
Marcin Kuzminski <marcin@python-works.com>
parents: 1483
diff changeset
64 :param match_dict:
bb6ba7442293 Fixed methods for checking if path in routes is a repo
Marcin Kuzminski <marcin@python-works.com>
parents: 1483
diff changeset
65 """
4116
ffd45b185016 Imported some of the GPLv3'd changes from RhodeCode v2.2.5.
Bradley M. Kuhn <bkuhn@sfconservancy.org>
parents: 4043
diff changeset
66 repo_group_name = match_dict.get('group_name')
ffd45b185016 Imported some of the GPLv3'd changes from RhodeCode v2.2.5.
Bradley M. Kuhn <bkuhn@sfconservancy.org>
parents: 4043
diff changeset
67 return is_valid_repo_group(repo_group_name, config['base_path'])
604
5cc96df705b9 fixed @repo into :repo for docs
Marcin Kuzminski <marcin@python-works.com>
parents: 547
diff changeset
68
3458
0ad025ee005e better detection of deleting groups with subgroups inside.
Marcin Kuzminski <marcin@python-works.com>
parents: 3416
diff changeset
69 def check_group_skip_path(environ, match_dict):
0ad025ee005e better detection of deleting groups with subgroups inside.
Marcin Kuzminski <marcin@python-works.com>
parents: 3416
diff changeset
70 """
0ad025ee005e better detection of deleting groups with subgroups inside.
Marcin Kuzminski <marcin@python-works.com>
parents: 3416
diff changeset
71 check for valid repository group for proper 404 handling, but skips
0ad025ee005e better detection of deleting groups with subgroups inside.
Marcin Kuzminski <marcin@python-works.com>
parents: 3416
diff changeset
72 verification of existing path
0ad025ee005e better detection of deleting groups with subgroups inside.
Marcin Kuzminski <marcin@python-works.com>
parents: 3416
diff changeset
73
0ad025ee005e better detection of deleting groups with subgroups inside.
Marcin Kuzminski <marcin@python-works.com>
parents: 3416
diff changeset
74 :param environ:
0ad025ee005e better detection of deleting groups with subgroups inside.
Marcin Kuzminski <marcin@python-works.com>
parents: 3416
diff changeset
75 :param match_dict:
0ad025ee005e better detection of deleting groups with subgroups inside.
Marcin Kuzminski <marcin@python-works.com>
parents: 3416
diff changeset
76 """
4116
ffd45b185016 Imported some of the GPLv3'd changes from RhodeCode v2.2.5.
Bradley M. Kuhn <bkuhn@sfconservancy.org>
parents: 4043
diff changeset
77 repo_group_name = match_dict.get('group_name')
ffd45b185016 Imported some of the GPLv3'd changes from RhodeCode v2.2.5.
Bradley M. Kuhn <bkuhn@sfconservancy.org>
parents: 4043
diff changeset
78 return is_valid_repo_group(repo_group_name, config['base_path'],
ffd45b185016 Imported some of the GPLv3'd changes from RhodeCode v2.2.5.
Bradley M. Kuhn <bkuhn@sfconservancy.org>
parents: 4043
diff changeset
79 skip_path_check=True)
3458
0ad025ee005e better detection of deleting groups with subgroups inside.
Marcin Kuzminski <marcin@python-works.com>
parents: 3416
diff changeset
80
3734
a8f520540ab0 New default permissions definition for user group create
Marcin Kuzminski <marcin@python-works.com>
parents: 3715
diff changeset
81 def check_user_group(environ, match_dict):
a8f520540ab0 New default permissions definition for user group create
Marcin Kuzminski <marcin@python-works.com>
parents: 3715
diff changeset
82 """
a8f520540ab0 New default permissions definition for user group create
Marcin Kuzminski <marcin@python-works.com>
parents: 3715
diff changeset
83 check for valid user group for proper 404 handling
a8f520540ab0 New default permissions definition for user group create
Marcin Kuzminski <marcin@python-works.com>
parents: 3715
diff changeset
84
a8f520540ab0 New default permissions definition for user group create
Marcin Kuzminski <marcin@python-works.com>
parents: 3715
diff changeset
85 :param environ:
a8f520540ab0 New default permissions definition for user group create
Marcin Kuzminski <marcin@python-works.com>
parents: 3715
diff changeset
86 :param match_dict:
a8f520540ab0 New default permissions definition for user group create
Marcin Kuzminski <marcin@python-works.com>
parents: 3715
diff changeset
87 """
a8f520540ab0 New default permissions definition for user group create
Marcin Kuzminski <marcin@python-works.com>
parents: 3715
diff changeset
88 return True
a8f520540ab0 New default permissions definition for user group create
Marcin Kuzminski <marcin@python-works.com>
parents: 3715
diff changeset
89
1348
dccba44ee176 translated resource map into full routes map, added validation for repos_group id
Marcin Kuzminski <marcin@python-works.com>
parents: 1333
diff changeset
90 def check_int(environ, match_dict):
dccba44ee176 translated resource map into full routes map, added validation for repos_group id
Marcin Kuzminski <marcin@python-works.com>
parents: 1333
diff changeset
91 return match_dict.get('id').isdigit()
dccba44ee176 translated resource map into full routes map, added validation for repos_group id
Marcin Kuzminski <marcin@python-works.com>
parents: 1333
diff changeset
92
0
564e40829f80 initial commit.
Marcin Kuzminski
parents:
diff changeset
93 # The ErrorController route (handles 404/500 error pages); it should
564e40829f80 initial commit.
Marcin Kuzminski
parents:
diff changeset
94 # likely stay at the top, ensuring it can always be resolved
1211
a7e7c0fab9db pep8ify
Marcin Kuzminski <marcin@python-works.com>
parents: 1205
diff changeset
95 rmap.connect('/error/{action}', controller='error')
a7e7c0fab9db pep8ify
Marcin Kuzminski <marcin@python-works.com>
parents: 1205
diff changeset
96 rmap.connect('/error/{action}/{id}', controller='error')
0
564e40829f80 initial commit.
Marcin Kuzminski
parents:
diff changeset
97
604
5cc96df705b9 fixed @repo into :repo for docs
Marcin Kuzminski <marcin@python-works.com>
parents: 547
diff changeset
98 #==========================================================================
0
564e40829f80 initial commit.
Marcin Kuzminski
parents:
diff changeset
99 # CUSTOM ROUTES HERE
604
5cc96df705b9 fixed @repo into :repo for docs
Marcin Kuzminski <marcin@python-works.com>
parents: 547
diff changeset
100 #==========================================================================
5cc96df705b9 fixed @repo into :repo for docs
Marcin Kuzminski <marcin@python-works.com>
parents: 547
diff changeset
101
5cc96df705b9 fixed @repo into :repo for docs
Marcin Kuzminski <marcin@python-works.com>
parents: 547
diff changeset
102 #MAIN PAGE
1211
a7e7c0fab9db pep8ify
Marcin Kuzminski <marcin@python-works.com>
parents: 1205
diff changeset
103 rmap.connect('home', '/', controller='home', action='index')
4116
ffd45b185016 Imported some of the GPLv3'd changes from RhodeCode v2.2.5.
Bradley M. Kuhn <bkuhn@sfconservancy.org>
parents: 4043
diff changeset
104 rmap.connect('repo_switcher_data', '/_repos', controller='home',
ffd45b185016 Imported some of the GPLv3'd changes from RhodeCode v2.2.5.
Bradley M. Kuhn <bkuhn@sfconservancy.org>
parents: 4043
diff changeset
105 action='repo_switcher_data')
ffd45b185016 Imported some of the GPLv3'd changes from RhodeCode v2.2.5.
Bradley M. Kuhn <bkuhn@sfconservancy.org>
parents: 4043
diff changeset
106
1680
cf370b6d3977 added rst help link
Marcin Kuzminski <marcin@python-works.com>
parents: 1674
diff changeset
107 rmap.connect('rst_help',
cf370b6d3977 added rst help link
Marcin Kuzminski <marcin@python-works.com>
parents: 1674
diff changeset
108 "http://docutils.sourceforge.net/docs/user/rst/quickref.html",
cf370b6d3977 added rst help link
Marcin Kuzminski <marcin@python-works.com>
parents: 1674
diff changeset
109 _static=True)
4116
ffd45b185016 Imported some of the GPLv3'd changes from RhodeCode v2.2.5.
Bradley M. Kuhn <bkuhn@sfconservancy.org>
parents: 4043
diff changeset
110 rmap.connect('rhodecode_official', "https://rhodecode.com", _static=True)
ffd45b185016 Imported some of the GPLv3'd changes from RhodeCode v2.2.5.
Bradley M. Kuhn <bkuhn@sfconservancy.org>
parents: 4043
diff changeset
111 rmap.connect('rc_issue_tracker', 'https://rhodecode.com/help/', _static=True)
1143
0e6035a85980 added changes made in production branch back into beta
Marcin Kuzminski <marcin@python-works.com>
parents: 1114
diff changeset
112
4116
ffd45b185016 Imported some of the GPLv3'd changes from RhodeCode v2.2.5.
Bradley M. Kuhn <bkuhn@sfconservancy.org>
parents: 4043
diff changeset
113 #ADMIN REPOSITORY ROUTES
1333
74aae890d33e refactor of routing to use one common prefix for admin, this way it's easier to change
Marcin Kuzminski <marcin@python-works.com>
parents: 1305
diff changeset
114 with rmap.submapper(path_prefix=ADMIN_PREFIX,
74aae890d33e refactor of routing to use one common prefix for admin, this way it's easier to change
Marcin Kuzminski <marcin@python-works.com>
parents: 1305
diff changeset
115 controller='admin/repos') as m:
248
fb7f066126cc Added support for repository located in subdirectories.
Marcin Kuzminski <marcin@python-works.com>
parents: 230
diff changeset
116 m.connect("repos", "/repos",
4116
ffd45b185016 Imported some of the GPLv3'd changes from RhodeCode v2.2.5.
Bradley M. Kuhn <bkuhn@sfconservancy.org>
parents: 4043
diff changeset
117 action="create", conditions=dict(method=["POST"]))
248
fb7f066126cc Added support for repository located in subdirectories.
Marcin Kuzminski <marcin@python-works.com>
parents: 230
diff changeset
118 m.connect("repos", "/repos",
4116
ffd45b185016 Imported some of the GPLv3'd changes from RhodeCode v2.2.5.
Bradley M. Kuhn <bkuhn@sfconservancy.org>
parents: 4043
diff changeset
119 action="index", conditions=dict(method=["GET"]))
3659
77e6e941001f fixed admin link for creating repos, and refactored the routes name
Marcin Kuzminski <marcin@python-works.com>
parents: 3653
diff changeset
120 m.connect("new_repo", "/create_repository",
3629
802c94bdfc85 #749 and #516 Removed dupliciting of repo settings for rhodecode admins and repo admins
Marcin Kuzminski <marcin@python-works.com>
parents: 3628
diff changeset
121 action="create_repository", conditions=dict(method=["GET"]))
2692
1f75b23c3e26 switched repo_name to non greedy match.
Marcin Kuzminski <marcin@python-works.com>
parents: 2631
diff changeset
122 m.connect("/repos/{repo_name:.*?}",
4116
ffd45b185016 Imported some of the GPLv3'd changes from RhodeCode v2.2.5.
Bradley M. Kuhn <bkuhn@sfconservancy.org>
parents: 4043
diff changeset
123 action="update", conditions=dict(method=["PUT"],
ffd45b185016 Imported some of the GPLv3'd changes from RhodeCode v2.2.5.
Bradley M. Kuhn <bkuhn@sfconservancy.org>
parents: 4043
diff changeset
124 function=check_repo))
ffd45b185016 Imported some of the GPLv3'd changes from RhodeCode v2.2.5.
Bradley M. Kuhn <bkuhn@sfconservancy.org>
parents: 4043
diff changeset
125 m.connect("delete_repo", "/repos/{repo_name:.*?}",
ffd45b185016 Imported some of the GPLv3'd changes from RhodeCode v2.2.5.
Bradley M. Kuhn <bkuhn@sfconservancy.org>
parents: 4043
diff changeset
126 action="delete", conditions=dict(method=["DELETE"],
ffd45b185016 Imported some of the GPLv3'd changes from RhodeCode v2.2.5.
Bradley M. Kuhn <bkuhn@sfconservancy.org>
parents: 4043
diff changeset
127 ))
2692
1f75b23c3e26 switched repo_name to non greedy match.
Marcin Kuzminski <marcin@python-works.com>
parents: 2631
diff changeset
128 m.connect("repo", "/repos/{repo_name:.*?}",
4116
ffd45b185016 Imported some of the GPLv3'd changes from RhodeCode v2.2.5.
Bradley M. Kuhn <bkuhn@sfconservancy.org>
parents: 4043
diff changeset
129 action="show", conditions=dict(method=["GET"],
ffd45b185016 Imported some of the GPLv3'd changes from RhodeCode v2.2.5.
Bradley M. Kuhn <bkuhn@sfconservancy.org>
parents: 4043
diff changeset
130 function=check_repo))
1015
65129c332d37 #56 added ajax removal of users groups,
Marcin Kuzminski <marcin@python-works.com>
parents: 976
diff changeset
131
4116
ffd45b185016 Imported some of the GPLv3'd changes from RhodeCode v2.2.5.
Bradley M. Kuhn <bkuhn@sfconservancy.org>
parents: 4043
diff changeset
132 #ADMIN REPOSITORY GROUPS ROUTES
1348
dccba44ee176 translated resource map into full routes map, added validation for repos_group id
Marcin Kuzminski <marcin@python-works.com>
parents: 1333
diff changeset
133 with rmap.submapper(path_prefix=ADMIN_PREFIX,
4116
ffd45b185016 Imported some of the GPLv3'd changes from RhodeCode v2.2.5.
Bradley M. Kuhn <bkuhn@sfconservancy.org>
parents: 4043
diff changeset
134 controller='admin/repo_groups') as m:
ffd45b185016 Imported some of the GPLv3'd changes from RhodeCode v2.2.5.
Bradley M. Kuhn <bkuhn@sfconservancy.org>
parents: 4043
diff changeset
135 m.connect("repos_groups", "/repo_groups",
1348
dccba44ee176 translated resource map into full routes map, added validation for repos_group id
Marcin Kuzminski <marcin@python-works.com>
parents: 1333
diff changeset
136 action="create", conditions=dict(method=["POST"]))
4116
ffd45b185016 Imported some of the GPLv3'd changes from RhodeCode v2.2.5.
Bradley M. Kuhn <bkuhn@sfconservancy.org>
parents: 4043
diff changeset
137 m.connect("repos_groups", "/repo_groups",
1348
dccba44ee176 translated resource map into full routes map, added validation for repos_group id
Marcin Kuzminski <marcin@python-works.com>
parents: 1333
diff changeset
138 action="index", conditions=dict(method=["GET"]))
4116
ffd45b185016 Imported some of the GPLv3'd changes from RhodeCode v2.2.5.
Bradley M. Kuhn <bkuhn@sfconservancy.org>
parents: 4043
diff changeset
139 m.connect("new_repos_group", "/repo_groups/new",
1348
dccba44ee176 translated resource map into full routes map, added validation for repos_group id
Marcin Kuzminski <marcin@python-works.com>
parents: 1333
diff changeset
140 action="new", conditions=dict(method=["GET"]))
4116
ffd45b185016 Imported some of the GPLv3'd changes from RhodeCode v2.2.5.
Bradley M. Kuhn <bkuhn@sfconservancy.org>
parents: 4043
diff changeset
141 m.connect("update_repos_group", "/repo_groups/{group_name:.*?}",
1348
dccba44ee176 translated resource map into full routes map, added validation for repos_group id
Marcin Kuzminski <marcin@python-works.com>
parents: 1333
diff changeset
142 action="update", conditions=dict(method=["PUT"],
3222
b4daef4cc26d Group management delegation:
Marcin Kuzminski <marcin@python-works.com>
parents: 3154
diff changeset
143 function=check_group))
3715
25dbbdae3ed9 consistent handling of grant/revoke of permissions widgets
Marcin Kuzminski <marcin@python-works.com>
parents: 3714
diff changeset
144
4116
ffd45b185016 Imported some of the GPLv3'd changes from RhodeCode v2.2.5.
Bradley M. Kuhn <bkuhn@sfconservancy.org>
parents: 4043
diff changeset
145 m.connect("repos_group", "/repo_groups/{group_name:.*?}",
1348
dccba44ee176 translated resource map into full routes map, added validation for repos_group id
Marcin Kuzminski <marcin@python-works.com>
parents: 1333
diff changeset
146 action="show", conditions=dict(method=["GET"],
3222
b4daef4cc26d Group management delegation:
Marcin Kuzminski <marcin@python-works.com>
parents: 3154
diff changeset
147 function=check_group))
3714
7e3d89d9d3a2 - Manage User’s Groups: create, delete, rename, add/remove users inside.
Marcin Kuzminski <marcin@python-works.com>
parents: 3695
diff changeset
148
4116
ffd45b185016 Imported some of the GPLv3'd changes from RhodeCode v2.2.5.
Bradley M. Kuhn <bkuhn@sfconservancy.org>
parents: 4043
diff changeset
149 #EXTRAS REPO GROUP ROUTES
ffd45b185016 Imported some of the GPLv3'd changes from RhodeCode v2.2.5.
Bradley M. Kuhn <bkuhn@sfconservancy.org>
parents: 4043
diff changeset
150 m.connect("edit_repo_group", "/repo_groups/{group_name:.*?}/edit",
ffd45b185016 Imported some of the GPLv3'd changes from RhodeCode v2.2.5.
Bradley M. Kuhn <bkuhn@sfconservancy.org>
parents: 4043
diff changeset
151 action="edit",
ffd45b185016 Imported some of the GPLv3'd changes from RhodeCode v2.2.5.
Bradley M. Kuhn <bkuhn@sfconservancy.org>
parents: 4043
diff changeset
152 conditions=dict(method=["GET"], function=check_group))
ffd45b185016 Imported some of the GPLv3'd changes from RhodeCode v2.2.5.
Bradley M. Kuhn <bkuhn@sfconservancy.org>
parents: 4043
diff changeset
153 m.connect("edit_repo_group", "/repo_groups/{group_name:.*?}/edit",
ffd45b185016 Imported some of the GPLv3'd changes from RhodeCode v2.2.5.
Bradley M. Kuhn <bkuhn@sfconservancy.org>
parents: 4043
diff changeset
154 action="edit",
ffd45b185016 Imported some of the GPLv3'd changes from RhodeCode v2.2.5.
Bradley M. Kuhn <bkuhn@sfconservancy.org>
parents: 4043
diff changeset
155 conditions=dict(method=["PUT"], function=check_group))
ffd45b185016 Imported some of the GPLv3'd changes from RhodeCode v2.2.5.
Bradley M. Kuhn <bkuhn@sfconservancy.org>
parents: 4043
diff changeset
156
ffd45b185016 Imported some of the GPLv3'd changes from RhodeCode v2.2.5.
Bradley M. Kuhn <bkuhn@sfconservancy.org>
parents: 4043
diff changeset
157 m.connect("edit_repo_group_advanced", "/repo_groups/{group_name:.*?}/edit/advanced",
ffd45b185016 Imported some of the GPLv3'd changes from RhodeCode v2.2.5.
Bradley M. Kuhn <bkuhn@sfconservancy.org>
parents: 4043
diff changeset
158 action="edit_repo_group_advanced",
ffd45b185016 Imported some of the GPLv3'd changes from RhodeCode v2.2.5.
Bradley M. Kuhn <bkuhn@sfconservancy.org>
parents: 4043
diff changeset
159 conditions=dict(method=["GET"], function=check_group))
ffd45b185016 Imported some of the GPLv3'd changes from RhodeCode v2.2.5.
Bradley M. Kuhn <bkuhn@sfconservancy.org>
parents: 4043
diff changeset
160 m.connect("edit_repo_group_advanced", "/repo_groups/{group_name:.*?}/edit/advanced",
ffd45b185016 Imported some of the GPLv3'd changes from RhodeCode v2.2.5.
Bradley M. Kuhn <bkuhn@sfconservancy.org>
parents: 4043
diff changeset
161 action="edit_repo_group_advanced",
ffd45b185016 Imported some of the GPLv3'd changes from RhodeCode v2.2.5.
Bradley M. Kuhn <bkuhn@sfconservancy.org>
parents: 4043
diff changeset
162 conditions=dict(method=["PUT"], function=check_group))
ffd45b185016 Imported some of the GPLv3'd changes from RhodeCode v2.2.5.
Bradley M. Kuhn <bkuhn@sfconservancy.org>
parents: 4043
diff changeset
163
ffd45b185016 Imported some of the GPLv3'd changes from RhodeCode v2.2.5.
Bradley M. Kuhn <bkuhn@sfconservancy.org>
parents: 4043
diff changeset
164 m.connect("edit_repo_group_perms", "/repo_groups/{group_name:.*?}/edit/permissions",
ffd45b185016 Imported some of the GPLv3'd changes from RhodeCode v2.2.5.
Bradley M. Kuhn <bkuhn@sfconservancy.org>
parents: 4043
diff changeset
165 action="edit_repo_group_perms",
ffd45b185016 Imported some of the GPLv3'd changes from RhodeCode v2.2.5.
Bradley M. Kuhn <bkuhn@sfconservancy.org>
parents: 4043
diff changeset
166 conditions=dict(method=["GET"], function=check_group))
ffd45b185016 Imported some of the GPLv3'd changes from RhodeCode v2.2.5.
Bradley M. Kuhn <bkuhn@sfconservancy.org>
parents: 4043
diff changeset
167 m.connect("edit_repo_group_perms", "/repo_groups/{group_name:.*?}/edit/permissions",
ffd45b185016 Imported some of the GPLv3'd changes from RhodeCode v2.2.5.
Bradley M. Kuhn <bkuhn@sfconservancy.org>
parents: 4043
diff changeset
168 action="update_perms",
ffd45b185016 Imported some of the GPLv3'd changes from RhodeCode v2.2.5.
Bradley M. Kuhn <bkuhn@sfconservancy.org>
parents: 4043
diff changeset
169 conditions=dict(method=["PUT"], function=check_group))
ffd45b185016 Imported some of the GPLv3'd changes from RhodeCode v2.2.5.
Bradley M. Kuhn <bkuhn@sfconservancy.org>
parents: 4043
diff changeset
170 m.connect("edit_repo_group_perms", "/repo_groups/{group_name:.*?}/edit/permissions",
ffd45b185016 Imported some of the GPLv3'd changes from RhodeCode v2.2.5.
Bradley M. Kuhn <bkuhn@sfconservancy.org>
parents: 4043
diff changeset
171 action="delete_perms",
ffd45b185016 Imported some of the GPLv3'd changes from RhodeCode v2.2.5.
Bradley M. Kuhn <bkuhn@sfconservancy.org>
parents: 4043
diff changeset
172 conditions=dict(method=["DELETE"], function=check_group))
ffd45b185016 Imported some of the GPLv3'd changes from RhodeCode v2.2.5.
Bradley M. Kuhn <bkuhn@sfconservancy.org>
parents: 4043
diff changeset
173
ffd45b185016 Imported some of the GPLv3'd changes from RhodeCode v2.2.5.
Bradley M. Kuhn <bkuhn@sfconservancy.org>
parents: 4043
diff changeset
174 m.connect("delete_repos_group", "/repo_groups/{group_name:.*?}",
ffd45b185016 Imported some of the GPLv3'd changes from RhodeCode v2.2.5.
Bradley M. Kuhn <bkuhn@sfconservancy.org>
parents: 4043
diff changeset
175 action="delete", conditions=dict(method=["DELETE"],
ffd45b185016 Imported some of the GPLv3'd changes from RhodeCode v2.2.5.
Bradley M. Kuhn <bkuhn@sfconservancy.org>
parents: 4043
diff changeset
176 function=check_group_skip_path))
ffd45b185016 Imported some of the GPLv3'd changes from RhodeCode v2.2.5.
Bradley M. Kuhn <bkuhn@sfconservancy.org>
parents: 4043
diff changeset
177
ffd45b185016 Imported some of the GPLv3'd changes from RhodeCode v2.2.5.
Bradley M. Kuhn <bkuhn@sfconservancy.org>
parents: 4043
diff changeset
178
ffd45b185016 Imported some of the GPLv3'd changes from RhodeCode v2.2.5.
Bradley M. Kuhn <bkuhn@sfconservancy.org>
parents: 4043
diff changeset
179 #ADMIN USER ROUTES
1333
74aae890d33e refactor of routing to use one common prefix for admin, this way it's easier to change
Marcin Kuzminski <marcin@python-works.com>
parents: 1305
diff changeset
180 with rmap.submapper(path_prefix=ADMIN_PREFIX,
74aae890d33e refactor of routing to use one common prefix for admin, this way it's easier to change
Marcin Kuzminski <marcin@python-works.com>
parents: 1305
diff changeset
181 controller='admin/users') as m:
1266
a1bcfe58a1ab Fixed #161 form saves the create repository permission.
Marcin Kuzminski <marcin@python-works.com>
parents: 1214
diff changeset
182 m.connect("users", "/users",
a1bcfe58a1ab Fixed #161 form saves the create repository permission.
Marcin Kuzminski <marcin@python-works.com>
parents: 1214
diff changeset
183 action="create", conditions=dict(method=["POST"]))
a1bcfe58a1ab Fixed #161 form saves the create repository permission.
Marcin Kuzminski <marcin@python-works.com>
parents: 1214
diff changeset
184 m.connect("users", "/users",
a1bcfe58a1ab Fixed #161 form saves the create repository permission.
Marcin Kuzminski <marcin@python-works.com>
parents: 1214
diff changeset
185 action="index", conditions=dict(method=["GET"]))
a1bcfe58a1ab Fixed #161 form saves the create repository permission.
Marcin Kuzminski <marcin@python-works.com>
parents: 1214
diff changeset
186 m.connect("formatted_users", "/users.{format}",
a1bcfe58a1ab Fixed #161 form saves the create repository permission.
Marcin Kuzminski <marcin@python-works.com>
parents: 1214
diff changeset
187 action="index", conditions=dict(method=["GET"]))
a1bcfe58a1ab Fixed #161 form saves the create repository permission.
Marcin Kuzminski <marcin@python-works.com>
parents: 1214
diff changeset
188 m.connect("new_user", "/users/new",
a1bcfe58a1ab Fixed #161 form saves the create repository permission.
Marcin Kuzminski <marcin@python-works.com>
parents: 1214
diff changeset
189 action="new", conditions=dict(method=["GET"]))
a1bcfe58a1ab Fixed #161 form saves the create repository permission.
Marcin Kuzminski <marcin@python-works.com>
parents: 1214
diff changeset
190 m.connect("update_user", "/users/{id}",
a1bcfe58a1ab Fixed #161 form saves the create repository permission.
Marcin Kuzminski <marcin@python-works.com>
parents: 1214
diff changeset
191 action="update", conditions=dict(method=["PUT"]))
a1bcfe58a1ab Fixed #161 form saves the create repository permission.
Marcin Kuzminski <marcin@python-works.com>
parents: 1214
diff changeset
192 m.connect("delete_user", "/users/{id}",
a1bcfe58a1ab Fixed #161 form saves the create repository permission.
Marcin Kuzminski <marcin@python-works.com>
parents: 1214
diff changeset
193 action="delete", conditions=dict(method=["DELETE"]))
a1bcfe58a1ab Fixed #161 form saves the create repository permission.
Marcin Kuzminski <marcin@python-works.com>
parents: 1214
diff changeset
194 m.connect("edit_user", "/users/{id}/edit",
a1bcfe58a1ab Fixed #161 form saves the create repository permission.
Marcin Kuzminski <marcin@python-works.com>
parents: 1214
diff changeset
195 action="edit", conditions=dict(method=["GET"]))
a1bcfe58a1ab Fixed #161 form saves the create repository permission.
Marcin Kuzminski <marcin@python-works.com>
parents: 1214
diff changeset
196 m.connect("user", "/users/{id}",
a1bcfe58a1ab Fixed #161 form saves the create repository permission.
Marcin Kuzminski <marcin@python-works.com>
parents: 1214
diff changeset
197 action="show", conditions=dict(method=["GET"]))
a1bcfe58a1ab Fixed #161 form saves the create repository permission.
Marcin Kuzminski <marcin@python-works.com>
parents: 1214
diff changeset
198
a1bcfe58a1ab Fixed #161 form saves the create repository permission.
Marcin Kuzminski <marcin@python-works.com>
parents: 1214
diff changeset
199 #EXTRAS USER ROUTES
4116
ffd45b185016 Imported some of the GPLv3'd changes from RhodeCode v2.2.5.
Bradley M. Kuhn <bkuhn@sfconservancy.org>
parents: 4043
diff changeset
200 m.connect("edit_user_advanced", "/users/{id}/edit/advanced",
ffd45b185016 Imported some of the GPLv3'd changes from RhodeCode v2.2.5.
Bradley M. Kuhn <bkuhn@sfconservancy.org>
parents: 4043
diff changeset
201 action="edit_advanced", conditions=dict(method=["GET"]))
ffd45b185016 Imported some of the GPLv3'd changes from RhodeCode v2.2.5.
Bradley M. Kuhn <bkuhn@sfconservancy.org>
parents: 4043
diff changeset
202 m.connect("edit_user_advanced", "/users/{id}/edit/advanced",
ffd45b185016 Imported some of the GPLv3'd changes from RhodeCode v2.2.5.
Bradley M. Kuhn <bkuhn@sfconservancy.org>
parents: 4043
diff changeset
203 action="update_advanced", conditions=dict(method=["PUT"]))
ffd45b185016 Imported some of the GPLv3'd changes from RhodeCode v2.2.5.
Bradley M. Kuhn <bkuhn@sfconservancy.org>
parents: 4043
diff changeset
204
ffd45b185016 Imported some of the GPLv3'd changes from RhodeCode v2.2.5.
Bradley M. Kuhn <bkuhn@sfconservancy.org>
parents: 4043
diff changeset
205 m.connect("edit_user_api_keys", "/users/{id}/edit/api_keys",
ffd45b185016 Imported some of the GPLv3'd changes from RhodeCode v2.2.5.
Bradley M. Kuhn <bkuhn@sfconservancy.org>
parents: 4043
diff changeset
206 action="edit_api_keys", conditions=dict(method=["GET"]))
ffd45b185016 Imported some of the GPLv3'd changes from RhodeCode v2.2.5.
Bradley M. Kuhn <bkuhn@sfconservancy.org>
parents: 4043
diff changeset
207 m.connect("edit_user_api_keys", "/users/{id}/edit/api_keys",
ffd45b185016 Imported some of the GPLv3'd changes from RhodeCode v2.2.5.
Bradley M. Kuhn <bkuhn@sfconservancy.org>
parents: 4043
diff changeset
208 action="add_api_key", conditions=dict(method=["PUT"]))
ffd45b185016 Imported some of the GPLv3'd changes from RhodeCode v2.2.5.
Bradley M. Kuhn <bkuhn@sfconservancy.org>
parents: 4043
diff changeset
209 m.connect("edit_user_api_keys", "/users/{id}/edit/api_keys",
ffd45b185016 Imported some of the GPLv3'd changes from RhodeCode v2.2.5.
Bradley M. Kuhn <bkuhn@sfconservancy.org>
parents: 4043
diff changeset
210 action="delete_api_key", conditions=dict(method=["DELETE"]))
ffd45b185016 Imported some of the GPLv3'd changes from RhodeCode v2.2.5.
Bradley M. Kuhn <bkuhn@sfconservancy.org>
parents: 4043
diff changeset
211
ffd45b185016 Imported some of the GPLv3'd changes from RhodeCode v2.2.5.
Bradley M. Kuhn <bkuhn@sfconservancy.org>
parents: 4043
diff changeset
212 m.connect("edit_user_perms", "/users/{id}/edit/permissions",
ffd45b185016 Imported some of the GPLv3'd changes from RhodeCode v2.2.5.
Bradley M. Kuhn <bkuhn@sfconservancy.org>
parents: 4043
diff changeset
213 action="edit_perms", conditions=dict(method=["GET"]))
ffd45b185016 Imported some of the GPLv3'd changes from RhodeCode v2.2.5.
Bradley M. Kuhn <bkuhn@sfconservancy.org>
parents: 4043
diff changeset
214 m.connect("edit_user_perms", "/users/{id}/edit/permissions",
ffd45b185016 Imported some of the GPLv3'd changes from RhodeCode v2.2.5.
Bradley M. Kuhn <bkuhn@sfconservancy.org>
parents: 4043
diff changeset
215 action="update_perms", conditions=dict(method=["PUT"]))
ffd45b185016 Imported some of the GPLv3'd changes from RhodeCode v2.2.5.
Bradley M. Kuhn <bkuhn@sfconservancy.org>
parents: 4043
diff changeset
216
ffd45b185016 Imported some of the GPLv3'd changes from RhodeCode v2.2.5.
Bradley M. Kuhn <bkuhn@sfconservancy.org>
parents: 4043
diff changeset
217 m.connect("edit_user_emails", "/users/{id}/edit/emails",
ffd45b185016 Imported some of the GPLv3'd changes from RhodeCode v2.2.5.
Bradley M. Kuhn <bkuhn@sfconservancy.org>
parents: 4043
diff changeset
218 action="edit_emails", conditions=dict(method=["GET"]))
ffd45b185016 Imported some of the GPLv3'd changes from RhodeCode v2.2.5.
Bradley M. Kuhn <bkuhn@sfconservancy.org>
parents: 4043
diff changeset
219 m.connect("edit_user_emails", "/users/{id}/edit/emails",
2330
b0fef8a77568 Added simple UI for admin to manage emails map
Marcin Kuzminski <marcin@python-works.com>
parents: 2244
diff changeset
220 action="add_email", conditions=dict(method=["PUT"]))
4116
ffd45b185016 Imported some of the GPLv3'd changes from RhodeCode v2.2.5.
Bradley M. Kuhn <bkuhn@sfconservancy.org>
parents: 4043
diff changeset
221 m.connect("edit_user_emails", "/users/{id}/edit/emails",
2330
b0fef8a77568 Added simple UI for admin to manage emails map
Marcin Kuzminski <marcin@python-works.com>
parents: 2244
diff changeset
222 action="delete_email", conditions=dict(method=["DELETE"]))
4116
ffd45b185016 Imported some of the GPLv3'd changes from RhodeCode v2.2.5.
Bradley M. Kuhn <bkuhn@sfconservancy.org>
parents: 4043
diff changeset
223
ffd45b185016 Imported some of the GPLv3'd changes from RhodeCode v2.2.5.
Bradley M. Kuhn <bkuhn@sfconservancy.org>
parents: 4043
diff changeset
224 m.connect("edit_user_ips", "/users/{id}/edit/ips",
ffd45b185016 Imported some of the GPLv3'd changes from RhodeCode v2.2.5.
Bradley M. Kuhn <bkuhn@sfconservancy.org>
parents: 4043
diff changeset
225 action="edit_ips", conditions=dict(method=["GET"]))
ffd45b185016 Imported some of the GPLv3'd changes from RhodeCode v2.2.5.
Bradley M. Kuhn <bkuhn@sfconservancy.org>
parents: 4043
diff changeset
226 m.connect("edit_user_ips", "/users/{id}/edit/ips",
3125
9b92cf5a0cca Added UserIpMap interface for allowed IP addresses and IP restriction access
Marcin Kuzminski <marcin@python-works.com>
parents: 3056
diff changeset
227 action="add_ip", conditions=dict(method=["PUT"]))
4116
ffd45b185016 Imported some of the GPLv3'd changes from RhodeCode v2.2.5.
Bradley M. Kuhn <bkuhn@sfconservancy.org>
parents: 4043
diff changeset
228 m.connect("edit_user_ips", "/users/{id}/edit/ips",
3125
9b92cf5a0cca Added UserIpMap interface for allowed IP addresses and IP restriction access
Marcin Kuzminski <marcin@python-works.com>
parents: 3056
diff changeset
229 action="delete_ip", conditions=dict(method=["DELETE"]))
959
fff21c9b075c #56 fixed found bugs, implemented adding of new group + forms+validators
Marcin Kuzminski <marcin@python-works.com>
parents: 956
diff changeset
230
3410
5f1850e4712a "Users groups" is grammatically incorrect English - rename to "user groups"
Mads Kiilerich <madski@unity3d.com>
parents: 3322
diff changeset
231 #ADMIN USER GROUPS REST ROUTES
1333
74aae890d33e refactor of routing to use one common prefix for admin, this way it's easier to change
Marcin Kuzminski <marcin@python-works.com>
parents: 1305
diff changeset
232 with rmap.submapper(path_prefix=ADMIN_PREFIX,
4116
ffd45b185016 Imported some of the GPLv3'd changes from RhodeCode v2.2.5.
Bradley M. Kuhn <bkuhn@sfconservancy.org>
parents: 4043
diff changeset
233 controller='admin/user_groups') as m:
ffd45b185016 Imported some of the GPLv3'd changes from RhodeCode v2.2.5.
Bradley M. Kuhn <bkuhn@sfconservancy.org>
parents: 4043
diff changeset
234 m.connect("users_groups", "/user_groups",
1271
aa7e45ad0cea Fixed permissions for users groups, group can have create repo permission now.
Marcin Kuzminski <marcin@python-works.com>
parents: 1266
diff changeset
235 action="create", conditions=dict(method=["POST"]))
4116
ffd45b185016 Imported some of the GPLv3'd changes from RhodeCode v2.2.5.
Bradley M. Kuhn <bkuhn@sfconservancy.org>
parents: 4043
diff changeset
236 m.connect("users_groups", "/user_groups",
1271
aa7e45ad0cea Fixed permissions for users groups, group can have create repo permission now.
Marcin Kuzminski <marcin@python-works.com>
parents: 1266
diff changeset
237 action="index", conditions=dict(method=["GET"]))
4116
ffd45b185016 Imported some of the GPLv3'd changes from RhodeCode v2.2.5.
Bradley M. Kuhn <bkuhn@sfconservancy.org>
parents: 4043
diff changeset
238 m.connect("new_users_group", "/user_groups/new",
1271
aa7e45ad0cea Fixed permissions for users groups, group can have create repo permission now.
Marcin Kuzminski <marcin@python-works.com>
parents: 1266
diff changeset
239 action="new", conditions=dict(method=["GET"]))
4116
ffd45b185016 Imported some of the GPLv3'd changes from RhodeCode v2.2.5.
Bradley M. Kuhn <bkuhn@sfconservancy.org>
parents: 4043
diff changeset
240 m.connect("update_users_group", "/user_groups/{id}",
1271
aa7e45ad0cea Fixed permissions for users groups, group can have create repo permission now.
Marcin Kuzminski <marcin@python-works.com>
parents: 1266
diff changeset
241 action="update", conditions=dict(method=["PUT"]))
4116
ffd45b185016 Imported some of the GPLv3'd changes from RhodeCode v2.2.5.
Bradley M. Kuhn <bkuhn@sfconservancy.org>
parents: 4043
diff changeset
242 m.connect("delete_users_group", "/user_groups/{id}",
1271
aa7e45ad0cea Fixed permissions for users groups, group can have create repo permission now.
Marcin Kuzminski <marcin@python-works.com>
parents: 1266
diff changeset
243 action="delete", conditions=dict(method=["DELETE"]))
4116
ffd45b185016 Imported some of the GPLv3'd changes from RhodeCode v2.2.5.
Bradley M. Kuhn <bkuhn@sfconservancy.org>
parents: 4043
diff changeset
244 m.connect("edit_users_group", "/user_groups/{id}/edit",
3734
a8f520540ab0 New default permissions definition for user group create
Marcin Kuzminski <marcin@python-works.com>
parents: 3715
diff changeset
245 action="edit", conditions=dict(method=["GET"]),
a8f520540ab0 New default permissions definition for user group create
Marcin Kuzminski <marcin@python-works.com>
parents: 3715
diff changeset
246 function=check_user_group)
4116
ffd45b185016 Imported some of the GPLv3'd changes from RhodeCode v2.2.5.
Bradley M. Kuhn <bkuhn@sfconservancy.org>
parents: 4043
diff changeset
247 m.connect("users_group", "/user_groups/{id}",
1271
aa7e45ad0cea Fixed permissions for users groups, group can have create repo permission now.
Marcin Kuzminski <marcin@python-works.com>
parents: 1266
diff changeset
248 action="show", conditions=dict(method=["GET"]))
aa7e45ad0cea Fixed permissions for users groups, group can have create repo permission now.
Marcin Kuzminski <marcin@python-works.com>
parents: 1266
diff changeset
249
4116
ffd45b185016 Imported some of the GPLv3'd changes from RhodeCode v2.2.5.
Bradley M. Kuhn <bkuhn@sfconservancy.org>
parents: 4043
diff changeset
250 #EXTRAS USER GROUP ROUTES
ffd45b185016 Imported some of the GPLv3'd changes from RhodeCode v2.2.5.
Bradley M. Kuhn <bkuhn@sfconservancy.org>
parents: 4043
diff changeset
251 m.connect("edit_user_group_default_perms", "/user_groups/{id}/edit/default_perms",
ffd45b185016 Imported some of the GPLv3'd changes from RhodeCode v2.2.5.
Bradley M. Kuhn <bkuhn@sfconservancy.org>
parents: 4043
diff changeset
252 action="edit_default_perms", conditions=dict(method=["GET"]))
ffd45b185016 Imported some of the GPLv3'd changes from RhodeCode v2.2.5.
Bradley M. Kuhn <bkuhn@sfconservancy.org>
parents: 4043
diff changeset
253 m.connect("edit_user_group_default_perms", "/user_groups/{id}/edit/default_perms",
ffd45b185016 Imported some of the GPLv3'd changes from RhodeCode v2.2.5.
Bradley M. Kuhn <bkuhn@sfconservancy.org>
parents: 4043
diff changeset
254 action="update_default_perms", conditions=dict(method=["PUT"]))
ffd45b185016 Imported some of the GPLv3'd changes from RhodeCode v2.2.5.
Bradley M. Kuhn <bkuhn@sfconservancy.org>
parents: 4043
diff changeset
255
956
83d35d716a02 started working on issue #56
Marcin Kuzminski <marcin@python-works.com>
parents: 872
diff changeset
256
4116
ffd45b185016 Imported some of the GPLv3'd changes from RhodeCode v2.2.5.
Bradley M. Kuhn <bkuhn@sfconservancy.org>
parents: 4043
diff changeset
257 m.connect("edit_user_group_perms", "/user_groups/{id}/edit/perms",
ffd45b185016 Imported some of the GPLv3'd changes from RhodeCode v2.2.5.
Bradley M. Kuhn <bkuhn@sfconservancy.org>
parents: 4043
diff changeset
258 action="edit_perms", conditions=dict(method=["GET"]))
ffd45b185016 Imported some of the GPLv3'd changes from RhodeCode v2.2.5.
Bradley M. Kuhn <bkuhn@sfconservancy.org>
parents: 4043
diff changeset
259 m.connect("edit_user_group_perms", "/user_groups/{id}/edit/perms",
ffd45b185016 Imported some of the GPLv3'd changes from RhodeCode v2.2.5.
Bradley M. Kuhn <bkuhn@sfconservancy.org>
parents: 4043
diff changeset
260 action="update_perms", conditions=dict(method=["PUT"]))
ffd45b185016 Imported some of the GPLv3'd changes from RhodeCode v2.2.5.
Bradley M. Kuhn <bkuhn@sfconservancy.org>
parents: 4043
diff changeset
261 m.connect("edit_user_group_perms", "/user_groups/{id}/edit/perms",
ffd45b185016 Imported some of the GPLv3'd changes from RhodeCode v2.2.5.
Bradley M. Kuhn <bkuhn@sfconservancy.org>
parents: 4043
diff changeset
262 action="delete_perms", conditions=dict(method=["DELETE"]))
ffd45b185016 Imported some of the GPLv3'd changes from RhodeCode v2.2.5.
Bradley M. Kuhn <bkuhn@sfconservancy.org>
parents: 4043
diff changeset
263
ffd45b185016 Imported some of the GPLv3'd changes from RhodeCode v2.2.5.
Bradley M. Kuhn <bkuhn@sfconservancy.org>
parents: 4043
diff changeset
264 m.connect("edit_user_group_advanced", "/user_groups/{id}/edit/advanced",
ffd45b185016 Imported some of the GPLv3'd changes from RhodeCode v2.2.5.
Bradley M. Kuhn <bkuhn@sfconservancy.org>
parents: 4043
diff changeset
265 action="edit_advanced", conditions=dict(method=["GET"]))
ffd45b185016 Imported some of the GPLv3'd changes from RhodeCode v2.2.5.
Bradley M. Kuhn <bkuhn@sfconservancy.org>
parents: 4043
diff changeset
266
ffd45b185016 Imported some of the GPLv3'd changes from RhodeCode v2.2.5.
Bradley M. Kuhn <bkuhn@sfconservancy.org>
parents: 4043
diff changeset
267 m.connect("edit_user_group_members", "/user_groups/{id}/edit/members",
ffd45b185016 Imported some of the GPLv3'd changes from RhodeCode v2.2.5.
Bradley M. Kuhn <bkuhn@sfconservancy.org>
parents: 4043
diff changeset
268 action="edit_members", conditions=dict(method=["GET"]))
3714
7e3d89d9d3a2 - Manage User’s Groups: create, delete, rename, add/remove users inside.
Marcin Kuzminski <marcin@python-works.com>
parents: 3695
diff changeset
269
4116
ffd45b185016 Imported some of the GPLv3'd changes from RhodeCode v2.2.5.
Bradley M. Kuhn <bkuhn@sfconservancy.org>
parents: 4043
diff changeset
270
ffd45b185016 Imported some of the GPLv3'd changes from RhodeCode v2.2.5.
Bradley M. Kuhn <bkuhn@sfconservancy.org>
parents: 4043
diff changeset
271
ffd45b185016 Imported some of the GPLv3'd changes from RhodeCode v2.2.5.
Bradley M. Kuhn <bkuhn@sfconservancy.org>
parents: 4043
diff changeset
272 #ADMIN PERMISSIONS ROUTES
ffd45b185016 Imported some of the GPLv3'd changes from RhodeCode v2.2.5.
Bradley M. Kuhn <bkuhn@sfconservancy.org>
parents: 4043
diff changeset
273 with rmap.submapper(path_prefix=ADMIN_PREFIX,
ffd45b185016 Imported some of the GPLv3'd changes from RhodeCode v2.2.5.
Bradley M. Kuhn <bkuhn@sfconservancy.org>
parents: 4043
diff changeset
274 controller='admin/permissions') as m:
ffd45b185016 Imported some of the GPLv3'd changes from RhodeCode v2.2.5.
Bradley M. Kuhn <bkuhn@sfconservancy.org>
parents: 4043
diff changeset
275 m.connect("admin_permissions", "/permissions",
ffd45b185016 Imported some of the GPLv3'd changes from RhodeCode v2.2.5.
Bradley M. Kuhn <bkuhn@sfconservancy.org>
parents: 4043
diff changeset
276 action="permission_globals", conditions=dict(method=["POST"]))
ffd45b185016 Imported some of the GPLv3'd changes from RhodeCode v2.2.5.
Bradley M. Kuhn <bkuhn@sfconservancy.org>
parents: 4043
diff changeset
277 m.connect("admin_permissions", "/permissions",
ffd45b185016 Imported some of the GPLv3'd changes from RhodeCode v2.2.5.
Bradley M. Kuhn <bkuhn@sfconservancy.org>
parents: 4043
diff changeset
278 action="permission_globals", conditions=dict(method=["GET"]))
3714
7e3d89d9d3a2 - Manage User’s Groups: create, delete, rename, add/remove users inside.
Marcin Kuzminski <marcin@python-works.com>
parents: 3695
diff changeset
279
4116
ffd45b185016 Imported some of the GPLv3'd changes from RhodeCode v2.2.5.
Bradley M. Kuhn <bkuhn@sfconservancy.org>
parents: 4043
diff changeset
280 m.connect("admin_permissions_ips", "/permissions/ips",
ffd45b185016 Imported some of the GPLv3'd changes from RhodeCode v2.2.5.
Bradley M. Kuhn <bkuhn@sfconservancy.org>
parents: 4043
diff changeset
281 action="permission_ips", conditions=dict(method=["POST"]))
ffd45b185016 Imported some of the GPLv3'd changes from RhodeCode v2.2.5.
Bradley M. Kuhn <bkuhn@sfconservancy.org>
parents: 4043
diff changeset
282 m.connect("admin_permissions_ips", "/permissions/ips",
ffd45b185016 Imported some of the GPLv3'd changes from RhodeCode v2.2.5.
Bradley M. Kuhn <bkuhn@sfconservancy.org>
parents: 4043
diff changeset
283 action="permission_ips", conditions=dict(method=["GET"]))
604
5cc96df705b9 fixed @repo into :repo for docs
Marcin Kuzminski <marcin@python-works.com>
parents: 547
diff changeset
284
4116
ffd45b185016 Imported some of the GPLv3'd changes from RhodeCode v2.2.5.
Bradley M. Kuhn <bkuhn@sfconservancy.org>
parents: 4043
diff changeset
285 m.connect("admin_permissions_perms", "/permissions/perms",
ffd45b185016 Imported some of the GPLv3'd changes from RhodeCode v2.2.5.
Bradley M. Kuhn <bkuhn@sfconservancy.org>
parents: 4043
diff changeset
286 action="permission_perms", conditions=dict(method=["POST"]))
ffd45b185016 Imported some of the GPLv3'd changes from RhodeCode v2.2.5.
Bradley M. Kuhn <bkuhn@sfconservancy.org>
parents: 4043
diff changeset
287 m.connect("admin_permissions_perms", "/permissions/perms",
ffd45b185016 Imported some of the GPLv3'd changes from RhodeCode v2.2.5.
Bradley M. Kuhn <bkuhn@sfconservancy.org>
parents: 4043
diff changeset
288 action="permission_perms", conditions=dict(method=["GET"]))
ffd45b185016 Imported some of the GPLv3'd changes from RhodeCode v2.2.5.
Bradley M. Kuhn <bkuhn@sfconservancy.org>
parents: 4043
diff changeset
289
769
4bdcc08b04c4 fixes #77 moved out ldap config to it's own section
Marcin Kuzminski <marcin@python-works.com>
parents: 734
diff changeset
290
3056
6104dfd35b16 Implemented #379 defaults settings page for creation of repositories
Marcin Kuzminski <marcin@python-works.com>
parents: 3040
diff changeset
291 #ADMIN DEFAULTS REST ROUTES
6104dfd35b16 Implemented #379 defaults settings page for creation of repositories
Marcin Kuzminski <marcin@python-works.com>
parents: 3040
diff changeset
292 rmap.resource('default', 'defaults',
6104dfd35b16 Implemented #379 defaults settings page for creation of repositories
Marcin Kuzminski <marcin@python-works.com>
parents: 3040
diff changeset
293 controller='admin/defaults', path_prefix=ADMIN_PREFIX)
6104dfd35b16 Implemented #379 defaults settings page for creation of repositories
Marcin Kuzminski <marcin@python-works.com>
parents: 3040
diff changeset
294
4116
ffd45b185016 Imported some of the GPLv3'd changes from RhodeCode v2.2.5.
Bradley M. Kuhn <bkuhn@sfconservancy.org>
parents: 4043
diff changeset
295 #ADMIN AUTH SETTINGS
ffd45b185016 Imported some of the GPLv3'd changes from RhodeCode v2.2.5.
Bradley M. Kuhn <bkuhn@sfconservancy.org>
parents: 4043
diff changeset
296 rmap.connect('auth_settings', '%s/auth' % ADMIN_PREFIX,
ffd45b185016 Imported some of the GPLv3'd changes from RhodeCode v2.2.5.
Bradley M. Kuhn <bkuhn@sfconservancy.org>
parents: 4043
diff changeset
297 controller='admin/auth_settings', action='auth_settings',
1211
a7e7c0fab9db pep8ify
Marcin Kuzminski <marcin@python-works.com>
parents: 1205
diff changeset
298 conditions=dict(method=["POST"]))
4116
ffd45b185016 Imported some of the GPLv3'd changes from RhodeCode v2.2.5.
Bradley M. Kuhn <bkuhn@sfconservancy.org>
parents: 4043
diff changeset
299 rmap.connect('auth_home', '%s/auth' % ADMIN_PREFIX,
ffd45b185016 Imported some of the GPLv3'd changes from RhodeCode v2.2.5.
Bradley M. Kuhn <bkuhn@sfconservancy.org>
parents: 4043
diff changeset
300 controller='admin/auth_settings')
1266
a1bcfe58a1ab Fixed #161 form saves the create repository permission.
Marcin Kuzminski <marcin@python-works.com>
parents: 1214
diff changeset
301
4116
ffd45b185016 Imported some of the GPLv3'd changes from RhodeCode v2.2.5.
Bradley M. Kuhn <bkuhn@sfconservancy.org>
parents: 4043
diff changeset
302 #ADMIN SETTINGS ROUTES
1333
74aae890d33e refactor of routing to use one common prefix for admin, this way it's easier to change
Marcin Kuzminski <marcin@python-works.com>
parents: 1305
diff changeset
303 with rmap.submapper(path_prefix=ADMIN_PREFIX,
1211
a7e7c0fab9db pep8ify
Marcin Kuzminski <marcin@python-works.com>
parents: 1205
diff changeset
304 controller='admin/settings') as m:
371
5cd6616b8673 routes python 2.5 compatible
Marcin Kuzminski <marcin@python-works.com>
parents: 363
diff changeset
305 m.connect("admin_settings", "/settings",
4116
ffd45b185016 Imported some of the GPLv3'd changes from RhodeCode v2.2.5.
Bradley M. Kuhn <bkuhn@sfconservancy.org>
parents: 4043
diff changeset
306 action="settings_vcs", conditions=dict(method=["POST"]))
371
5cd6616b8673 routes python 2.5 compatible
Marcin Kuzminski <marcin@python-works.com>
parents: 363
diff changeset
307 m.connect("admin_settings", "/settings",
4116
ffd45b185016 Imported some of the GPLv3'd changes from RhodeCode v2.2.5.
Bradley M. Kuhn <bkuhn@sfconservancy.org>
parents: 4043
diff changeset
308 action="settings_vcs", conditions=dict(method=["GET"]))
ffd45b185016 Imported some of the GPLv3'd changes from RhodeCode v2.2.5.
Bradley M. Kuhn <bkuhn@sfconservancy.org>
parents: 4043
diff changeset
309
ffd45b185016 Imported some of the GPLv3'd changes from RhodeCode v2.2.5.
Bradley M. Kuhn <bkuhn@sfconservancy.org>
parents: 4043
diff changeset
310 m.connect("admin_settings_mapping", "/settings/mapping",
ffd45b185016 Imported some of the GPLv3'd changes from RhodeCode v2.2.5.
Bradley M. Kuhn <bkuhn@sfconservancy.org>
parents: 4043
diff changeset
311 action="settings_mapping", conditions=dict(method=["POST"]))
ffd45b185016 Imported some of the GPLv3'd changes from RhodeCode v2.2.5.
Bradley M. Kuhn <bkuhn@sfconservancy.org>
parents: 4043
diff changeset
312 m.connect("admin_settings_mapping", "/settings/mapping",
ffd45b185016 Imported some of the GPLv3'd changes from RhodeCode v2.2.5.
Bradley M. Kuhn <bkuhn@sfconservancy.org>
parents: 4043
diff changeset
313 action="settings_mapping", conditions=dict(method=["GET"]))
ffd45b185016 Imported some of the GPLv3'd changes from RhodeCode v2.2.5.
Bradley M. Kuhn <bkuhn@sfconservancy.org>
parents: 4043
diff changeset
314
ffd45b185016 Imported some of the GPLv3'd changes from RhodeCode v2.2.5.
Bradley M. Kuhn <bkuhn@sfconservancy.org>
parents: 4043
diff changeset
315 m.connect("admin_settings_global", "/settings/global",
ffd45b185016 Imported some of the GPLv3'd changes from RhodeCode v2.2.5.
Bradley M. Kuhn <bkuhn@sfconservancy.org>
parents: 4043
diff changeset
316 action="settings_global", conditions=dict(method=["POST"]))
ffd45b185016 Imported some of the GPLv3'd changes from RhodeCode v2.2.5.
Bradley M. Kuhn <bkuhn@sfconservancy.org>
parents: 4043
diff changeset
317 m.connect("admin_settings_global", "/settings/global",
ffd45b185016 Imported some of the GPLv3'd changes from RhodeCode v2.2.5.
Bradley M. Kuhn <bkuhn@sfconservancy.org>
parents: 4043
diff changeset
318 action="settings_global", conditions=dict(method=["GET"]))
ffd45b185016 Imported some of the GPLv3'd changes from RhodeCode v2.2.5.
Bradley M. Kuhn <bkuhn@sfconservancy.org>
parents: 4043
diff changeset
319
ffd45b185016 Imported some of the GPLv3'd changes from RhodeCode v2.2.5.
Bradley M. Kuhn <bkuhn@sfconservancy.org>
parents: 4043
diff changeset
320 m.connect("admin_settings_visual", "/settings/visual",
ffd45b185016 Imported some of the GPLv3'd changes from RhodeCode v2.2.5.
Bradley M. Kuhn <bkuhn@sfconservancy.org>
parents: 4043
diff changeset
321 action="settings_visual", conditions=dict(method=["POST"]))
ffd45b185016 Imported some of the GPLv3'd changes from RhodeCode v2.2.5.
Bradley M. Kuhn <bkuhn@sfconservancy.org>
parents: 4043
diff changeset
322 m.connect("admin_settings_visual", "/settings/visual",
ffd45b185016 Imported some of the GPLv3'd changes from RhodeCode v2.2.5.
Bradley M. Kuhn <bkuhn@sfconservancy.org>
parents: 4043
diff changeset
323 action="settings_visual", conditions=dict(method=["GET"]))
ffd45b185016 Imported some of the GPLv3'd changes from RhodeCode v2.2.5.
Bradley M. Kuhn <bkuhn@sfconservancy.org>
parents: 4043
diff changeset
324
ffd45b185016 Imported some of the GPLv3'd changes from RhodeCode v2.2.5.
Bradley M. Kuhn <bkuhn@sfconservancy.org>
parents: 4043
diff changeset
325 m.connect("admin_settings_email", "/settings/email",
ffd45b185016 Imported some of the GPLv3'd changes from RhodeCode v2.2.5.
Bradley M. Kuhn <bkuhn@sfconservancy.org>
parents: 4043
diff changeset
326 action="settings_email", conditions=dict(method=["POST"]))
ffd45b185016 Imported some of the GPLv3'd changes from RhodeCode v2.2.5.
Bradley M. Kuhn <bkuhn@sfconservancy.org>
parents: 4043
diff changeset
327 m.connect("admin_settings_email", "/settings/email",
ffd45b185016 Imported some of the GPLv3'd changes from RhodeCode v2.2.5.
Bradley M. Kuhn <bkuhn@sfconservancy.org>
parents: 4043
diff changeset
328 action="settings_email", conditions=dict(method=["GET"]))
ffd45b185016 Imported some of the GPLv3'd changes from RhodeCode v2.2.5.
Bradley M. Kuhn <bkuhn@sfconservancy.org>
parents: 4043
diff changeset
329
ffd45b185016 Imported some of the GPLv3'd changes from RhodeCode v2.2.5.
Bradley M. Kuhn <bkuhn@sfconservancy.org>
parents: 4043
diff changeset
330 m.connect("admin_settings_hooks", "/settings/hooks",
ffd45b185016 Imported some of the GPLv3'd changes from RhodeCode v2.2.5.
Bradley M. Kuhn <bkuhn@sfconservancy.org>
parents: 4043
diff changeset
331 action="settings_hooks", conditions=dict(method=["POST"]))
ffd45b185016 Imported some of the GPLv3'd changes from RhodeCode v2.2.5.
Bradley M. Kuhn <bkuhn@sfconservancy.org>
parents: 4043
diff changeset
332 m.connect("admin_settings_hooks", "/settings/hooks",
ffd45b185016 Imported some of the GPLv3'd changes from RhodeCode v2.2.5.
Bradley M. Kuhn <bkuhn@sfconservancy.org>
parents: 4043
diff changeset
333 action="settings_hooks", conditions=dict(method=["DELETE"]))
ffd45b185016 Imported some of the GPLv3'd changes from RhodeCode v2.2.5.
Bradley M. Kuhn <bkuhn@sfconservancy.org>
parents: 4043
diff changeset
334 m.connect("admin_settings_hooks", "/settings/hooks",
ffd45b185016 Imported some of the GPLv3'd changes from RhodeCode v2.2.5.
Bradley M. Kuhn <bkuhn@sfconservancy.org>
parents: 4043
diff changeset
335 action="settings_hooks", conditions=dict(method=["GET"]))
ffd45b185016 Imported some of the GPLv3'd changes from RhodeCode v2.2.5.
Bradley M. Kuhn <bkuhn@sfconservancy.org>
parents: 4043
diff changeset
336
ffd45b185016 Imported some of the GPLv3'd changes from RhodeCode v2.2.5.
Bradley M. Kuhn <bkuhn@sfconservancy.org>
parents: 4043
diff changeset
337 m.connect("admin_settings_search", "/settings/search",
ffd45b185016 Imported some of the GPLv3'd changes from RhodeCode v2.2.5.
Bradley M. Kuhn <bkuhn@sfconservancy.org>
parents: 4043
diff changeset
338 action="settings_search", conditions=dict(method=["POST"]))
ffd45b185016 Imported some of the GPLv3'd changes from RhodeCode v2.2.5.
Bradley M. Kuhn <bkuhn@sfconservancy.org>
parents: 4043
diff changeset
339 m.connect("admin_settings_search", "/settings/search",
ffd45b185016 Imported some of the GPLv3'd changes from RhodeCode v2.2.5.
Bradley M. Kuhn <bkuhn@sfconservancy.org>
parents: 4043
diff changeset
340 action="settings_search", conditions=dict(method=["GET"]))
ffd45b185016 Imported some of the GPLv3'd changes from RhodeCode v2.2.5.
Bradley M. Kuhn <bkuhn@sfconservancy.org>
parents: 4043
diff changeset
341
ffd45b185016 Imported some of the GPLv3'd changes from RhodeCode v2.2.5.
Bradley M. Kuhn <bkuhn@sfconservancy.org>
parents: 4043
diff changeset
342 m.connect("admin_settings_system", "/settings/system",
ffd45b185016 Imported some of the GPLv3'd changes from RhodeCode v2.2.5.
Bradley M. Kuhn <bkuhn@sfconservancy.org>
parents: 4043
diff changeset
343 action="settings_system", conditions=dict(method=["POST"]))
ffd45b185016 Imported some of the GPLv3'd changes from RhodeCode v2.2.5.
Bradley M. Kuhn <bkuhn@sfconservancy.org>
parents: 4043
diff changeset
344 m.connect("admin_settings_system", "/settings/system",
ffd45b185016 Imported some of the GPLv3'd changes from RhodeCode v2.2.5.
Bradley M. Kuhn <bkuhn@sfconservancy.org>
parents: 4043
diff changeset
345 action="settings_system", conditions=dict(method=["GET"]))
ffd45b185016 Imported some of the GPLv3'd changes from RhodeCode v2.2.5.
Bradley M. Kuhn <bkuhn@sfconservancy.org>
parents: 4043
diff changeset
346 m.connect("admin_settings_system_update", "/settings/system/updates",
ffd45b185016 Imported some of the GPLv3'd changes from RhodeCode v2.2.5.
Bradley M. Kuhn <bkuhn@sfconservancy.org>
parents: 4043
diff changeset
347 action="settings_system_update", conditions=dict(method=["GET"]))
ffd45b185016 Imported some of the GPLv3'd changes from RhodeCode v2.2.5.
Bradley M. Kuhn <bkuhn@sfconservancy.org>
parents: 4043
diff changeset
348
ffd45b185016 Imported some of the GPLv3'd changes from RhodeCode v2.2.5.
Bradley M. Kuhn <bkuhn@sfconservancy.org>
parents: 4043
diff changeset
349 #ADMIN MY ACCOUNT
ffd45b185016 Imported some of the GPLv3'd changes from RhodeCode v2.2.5.
Bradley M. Kuhn <bkuhn@sfconservancy.org>
parents: 4043
diff changeset
350 with rmap.submapper(path_prefix=ADMIN_PREFIX,
ffd45b185016 Imported some of the GPLv3'd changes from RhodeCode v2.2.5.
Bradley M. Kuhn <bkuhn@sfconservancy.org>
parents: 4043
diff changeset
351 controller='admin/my_account') as m:
ffd45b185016 Imported some of the GPLv3'd changes from RhodeCode v2.2.5.
Bradley M. Kuhn <bkuhn@sfconservancy.org>
parents: 4043
diff changeset
352
ffd45b185016 Imported some of the GPLv3'd changes from RhodeCode v2.2.5.
Bradley M. Kuhn <bkuhn@sfconservancy.org>
parents: 4043
diff changeset
353 m.connect("my_account", "/my_account",
1211
a7e7c0fab9db pep8ify
Marcin Kuzminski <marcin@python-works.com>
parents: 1205
diff changeset
354 action="my_account", conditions=dict(method=["GET"]))
4116
ffd45b185016 Imported some of the GPLv3'd changes from RhodeCode v2.2.5.
Bradley M. Kuhn <bkuhn@sfconservancy.org>
parents: 4043
diff changeset
355 m.connect("my_account", "/my_account",
ffd45b185016 Imported some of the GPLv3'd changes from RhodeCode v2.2.5.
Bradley M. Kuhn <bkuhn@sfconservancy.org>
parents: 4043
diff changeset
356 action="my_account", conditions=dict(method=["POST"]))
ffd45b185016 Imported some of the GPLv3'd changes from RhodeCode v2.2.5.
Bradley M. Kuhn <bkuhn@sfconservancy.org>
parents: 4043
diff changeset
357
ffd45b185016 Imported some of the GPLv3'd changes from RhodeCode v2.2.5.
Bradley M. Kuhn <bkuhn@sfconservancy.org>
parents: 4043
diff changeset
358 m.connect("my_account_password", "/my_account/password",
ffd45b185016 Imported some of the GPLv3'd changes from RhodeCode v2.2.5.
Bradley M. Kuhn <bkuhn@sfconservancy.org>
parents: 4043
diff changeset
359 action="my_account_password", conditions=dict(method=["GET"]))
ffd45b185016 Imported some of the GPLv3'd changes from RhodeCode v2.2.5.
Bradley M. Kuhn <bkuhn@sfconservancy.org>
parents: 4043
diff changeset
360 m.connect("my_account_password", "/my_account/password",
ffd45b185016 Imported some of the GPLv3'd changes from RhodeCode v2.2.5.
Bradley M. Kuhn <bkuhn@sfconservancy.org>
parents: 4043
diff changeset
361 action="my_account_password", conditions=dict(method=["POST"]))
ffd45b185016 Imported some of the GPLv3'd changes from RhodeCode v2.2.5.
Bradley M. Kuhn <bkuhn@sfconservancy.org>
parents: 4043
diff changeset
362
ffd45b185016 Imported some of the GPLv3'd changes from RhodeCode v2.2.5.
Bradley M. Kuhn <bkuhn@sfconservancy.org>
parents: 4043
diff changeset
363 m.connect("my_account_repos", "/my_account/repos",
ffd45b185016 Imported some of the GPLv3'd changes from RhodeCode v2.2.5.
Bradley M. Kuhn <bkuhn@sfconservancy.org>
parents: 4043
diff changeset
364 action="my_account_repos", conditions=dict(method=["GET"]))
ffd45b185016 Imported some of the GPLv3'd changes from RhodeCode v2.2.5.
Bradley M. Kuhn <bkuhn@sfconservancy.org>
parents: 4043
diff changeset
365
ffd45b185016 Imported some of the GPLv3'd changes from RhodeCode v2.2.5.
Bradley M. Kuhn <bkuhn@sfconservancy.org>
parents: 4043
diff changeset
366 m.connect("my_account_watched", "/my_account/watched",
ffd45b185016 Imported some of the GPLv3'd changes from RhodeCode v2.2.5.
Bradley M. Kuhn <bkuhn@sfconservancy.org>
parents: 4043
diff changeset
367 action="my_account_watched", conditions=dict(method=["GET"]))
ffd45b185016 Imported some of the GPLv3'd changes from RhodeCode v2.2.5.
Bradley M. Kuhn <bkuhn@sfconservancy.org>
parents: 4043
diff changeset
368
ffd45b185016 Imported some of the GPLv3'd changes from RhodeCode v2.2.5.
Bradley M. Kuhn <bkuhn@sfconservancy.org>
parents: 4043
diff changeset
369 m.connect("my_account_pullrequests", "/my_account/pull_requests",
ffd45b185016 Imported some of the GPLv3'd changes from RhodeCode v2.2.5.
Bradley M. Kuhn <bkuhn@sfconservancy.org>
parents: 4043
diff changeset
370 action="my_account_pullrequests", conditions=dict(method=["GET"]))
ffd45b185016 Imported some of the GPLv3'd changes from RhodeCode v2.2.5.
Bradley M. Kuhn <bkuhn@sfconservancy.org>
parents: 4043
diff changeset
371
ffd45b185016 Imported some of the GPLv3'd changes from RhodeCode v2.2.5.
Bradley M. Kuhn <bkuhn@sfconservancy.org>
parents: 4043
diff changeset
372 m.connect("my_account_perms", "/my_account/perms",
ffd45b185016 Imported some of the GPLv3'd changes from RhodeCode v2.2.5.
Bradley M. Kuhn <bkuhn@sfconservancy.org>
parents: 4043
diff changeset
373 action="my_account_perms", conditions=dict(method=["GET"]))
ffd45b185016 Imported some of the GPLv3'd changes from RhodeCode v2.2.5.
Bradley M. Kuhn <bkuhn@sfconservancy.org>
parents: 4043
diff changeset
374
ffd45b185016 Imported some of the GPLv3'd changes from RhodeCode v2.2.5.
Bradley M. Kuhn <bkuhn@sfconservancy.org>
parents: 4043
diff changeset
375 m.connect("my_account_emails", "/my_account/emails",
ffd45b185016 Imported some of the GPLv3'd changes from RhodeCode v2.2.5.
Bradley M. Kuhn <bkuhn@sfconservancy.org>
parents: 4043
diff changeset
376 action="my_account_emails", conditions=dict(method=["GET"]))
ffd45b185016 Imported some of the GPLv3'd changes from RhodeCode v2.2.5.
Bradley M. Kuhn <bkuhn@sfconservancy.org>
parents: 4043
diff changeset
377 m.connect("my_account_emails", "/my_account/emails",
ffd45b185016 Imported some of the GPLv3'd changes from RhodeCode v2.2.5.
Bradley M. Kuhn <bkuhn@sfconservancy.org>
parents: 4043
diff changeset
378 action="my_account_emails_add", conditions=dict(method=["POST"]))
ffd45b185016 Imported some of the GPLv3'd changes from RhodeCode v2.2.5.
Bradley M. Kuhn <bkuhn@sfconservancy.org>
parents: 4043
diff changeset
379 m.connect("my_account_emails", "/my_account/emails",
ffd45b185016 Imported some of the GPLv3'd changes from RhodeCode v2.2.5.
Bradley M. Kuhn <bkuhn@sfconservancy.org>
parents: 4043
diff changeset
380 action="my_account_emails_delete", conditions=dict(method=["DELETE"]))
ffd45b185016 Imported some of the GPLv3'd changes from RhodeCode v2.2.5.
Bradley M. Kuhn <bkuhn@sfconservancy.org>
parents: 4043
diff changeset
381
ffd45b185016 Imported some of the GPLv3'd changes from RhodeCode v2.2.5.
Bradley M. Kuhn <bkuhn@sfconservancy.org>
parents: 4043
diff changeset
382 m.connect("my_account_api_keys", "/my_account/api_keys",
ffd45b185016 Imported some of the GPLv3'd changes from RhodeCode v2.2.5.
Bradley M. Kuhn <bkuhn@sfconservancy.org>
parents: 4043
diff changeset
383 action="my_account_api_keys", conditions=dict(method=["GET"]))
ffd45b185016 Imported some of the GPLv3'd changes from RhodeCode v2.2.5.
Bradley M. Kuhn <bkuhn@sfconservancy.org>
parents: 4043
diff changeset
384 m.connect("my_account_api_keys", "/my_account/api_keys",
ffd45b185016 Imported some of the GPLv3'd changes from RhodeCode v2.2.5.
Bradley M. Kuhn <bkuhn@sfconservancy.org>
parents: 4043
diff changeset
385 action="my_account_api_keys_add", conditions=dict(method=["POST"]))
ffd45b185016 Imported some of the GPLv3'd changes from RhodeCode v2.2.5.
Bradley M. Kuhn <bkuhn@sfconservancy.org>
parents: 4043
diff changeset
386 m.connect("my_account_api_keys", "/my_account/api_keys",
ffd45b185016 Imported some of the GPLv3'd changes from RhodeCode v2.2.5.
Bradley M. Kuhn <bkuhn@sfconservancy.org>
parents: 4043
diff changeset
387 action="my_account_api_keys_delete", conditions=dict(method=["DELETE"]))
2624
19daa8d761dc Improvements to my account page
Marcin Kuzminski <marcin@python-works.com>
parents: 2614
diff changeset
388
1712
cac5109ac3b6 Notification system improvements
Marcin Kuzminski <marcin@python-works.com>
parents: 1702
diff changeset
389 #NOTIFICATION REST ROUTES
cac5109ac3b6 Notification system improvements
Marcin Kuzminski <marcin@python-works.com>
parents: 1702
diff changeset
390 with rmap.submapper(path_prefix=ADMIN_PREFIX,
cac5109ac3b6 Notification system improvements
Marcin Kuzminski <marcin@python-works.com>
parents: 1702
diff changeset
391 controller='admin/notifications') as m:
cac5109ac3b6 Notification system improvements
Marcin Kuzminski <marcin@python-works.com>
parents: 1702
diff changeset
392 m.connect("notifications", "/notifications",
cac5109ac3b6 Notification system improvements
Marcin Kuzminski <marcin@python-works.com>
parents: 1702
diff changeset
393 action="create", conditions=dict(method=["POST"]))
cac5109ac3b6 Notification system improvements
Marcin Kuzminski <marcin@python-works.com>
parents: 1702
diff changeset
394 m.connect("notifications", "/notifications",
cac5109ac3b6 Notification system improvements
Marcin Kuzminski <marcin@python-works.com>
parents: 1702
diff changeset
395 action="index", conditions=dict(method=["GET"]))
1791
2aee0dc1784e mark all read button for notifications
Marcin Kuzminski <marcin@python-works.com>
parents: 1755
diff changeset
396 m.connect("notifications_mark_all_read", "/notifications/mark_all_read",
2aee0dc1784e mark all read button for notifications
Marcin Kuzminski <marcin@python-works.com>
parents: 1755
diff changeset
397 action="mark_all_read", conditions=dict(method=["GET"]))
1712
cac5109ac3b6 Notification system improvements
Marcin Kuzminski <marcin@python-works.com>
parents: 1702
diff changeset
398 m.connect("formatted_notifications", "/notifications.{format}",
cac5109ac3b6 Notification system improvements
Marcin Kuzminski <marcin@python-works.com>
parents: 1702
diff changeset
399 action="index", conditions=dict(method=["GET"]))
cac5109ac3b6 Notification system improvements
Marcin Kuzminski <marcin@python-works.com>
parents: 1702
diff changeset
400 m.connect("new_notification", "/notifications/new",
cac5109ac3b6 Notification system improvements
Marcin Kuzminski <marcin@python-works.com>
parents: 1702
diff changeset
401 action="new", conditions=dict(method=["GET"]))
cac5109ac3b6 Notification system improvements
Marcin Kuzminski <marcin@python-works.com>
parents: 1702
diff changeset
402 m.connect("formatted_new_notification", "/notifications/new.{format}",
cac5109ac3b6 Notification system improvements
Marcin Kuzminski <marcin@python-works.com>
parents: 1702
diff changeset
403 action="new", conditions=dict(method=["GET"]))
3882
2c5ceb546234 renamed gists routing to proper plural names
Marcin Kuzminski <marcin@python-works.com>
parents: 3874
diff changeset
404 m.connect("/notifications/{notification_id}",
1712
cac5109ac3b6 Notification system improvements
Marcin Kuzminski <marcin@python-works.com>
parents: 1702
diff changeset
405 action="update", conditions=dict(method=["PUT"]))
3882
2c5ceb546234 renamed gists routing to proper plural names
Marcin Kuzminski <marcin@python-works.com>
parents: 3874
diff changeset
406 m.connect("/notifications/{notification_id}",
1712
cac5109ac3b6 Notification system improvements
Marcin Kuzminski <marcin@python-works.com>
parents: 1702
diff changeset
407 action="delete", conditions=dict(method=["DELETE"]))
3882
2c5ceb546234 renamed gists routing to proper plural names
Marcin Kuzminski <marcin@python-works.com>
parents: 3874
diff changeset
408 m.connect("edit_notification", "/notifications/{notification_id}/edit",
1712
cac5109ac3b6 Notification system improvements
Marcin Kuzminski <marcin@python-works.com>
parents: 1702
diff changeset
409 action="edit", conditions=dict(method=["GET"]))
cac5109ac3b6 Notification system improvements
Marcin Kuzminski <marcin@python-works.com>
parents: 1702
diff changeset
410 m.connect("formatted_edit_notification",
3882
2c5ceb546234 renamed gists routing to proper plural names
Marcin Kuzminski <marcin@python-works.com>
parents: 3874
diff changeset
411 "/notifications/{notification_id}.{format}/edit",
1712
cac5109ac3b6 Notification system improvements
Marcin Kuzminski <marcin@python-works.com>
parents: 1702
diff changeset
412 action="edit", conditions=dict(method=["GET"]))
3882
2c5ceb546234 renamed gists routing to proper plural names
Marcin Kuzminski <marcin@python-works.com>
parents: 3874
diff changeset
413 m.connect("notification", "/notifications/{notification_id}",
1712
cac5109ac3b6 Notification system improvements
Marcin Kuzminski <marcin@python-works.com>
parents: 1702
diff changeset
414 action="show", conditions=dict(method=["GET"]))
3882
2c5ceb546234 renamed gists routing to proper plural names
Marcin Kuzminski <marcin@python-works.com>
parents: 3874
diff changeset
415 m.connect("formatted_notification", "/notifications/{notification_id}.{format}",
1712
cac5109ac3b6 Notification system improvements
Marcin Kuzminski <marcin@python-works.com>
parents: 1702
diff changeset
416 action="show", conditions=dict(method=["GET"]))
cac5109ac3b6 Notification system improvements
Marcin Kuzminski <marcin@python-works.com>
parents: 1702
diff changeset
417
3866
1fdec7e3aeb2 refactored url.resource to full definition of routes
Marcin Kuzminski <marcin@python-works.com>
parents: 3840
diff changeset
418 #ADMIN GIST
1fdec7e3aeb2 refactored url.resource to full definition of routes
Marcin Kuzminski <marcin@python-works.com>
parents: 3840
diff changeset
419 with rmap.submapper(path_prefix=ADMIN_PREFIX,
1fdec7e3aeb2 refactored url.resource to full definition of routes
Marcin Kuzminski <marcin@python-works.com>
parents: 3840
diff changeset
420 controller='admin/gists') as m:
1fdec7e3aeb2 refactored url.resource to full definition of routes
Marcin Kuzminski <marcin@python-works.com>
parents: 3840
diff changeset
421 m.connect("gists", "/gists",
1fdec7e3aeb2 refactored url.resource to full definition of routes
Marcin Kuzminski <marcin@python-works.com>
parents: 3840
diff changeset
422 action="create", conditions=dict(method=["POST"]))
1fdec7e3aeb2 refactored url.resource to full definition of routes
Marcin Kuzminski <marcin@python-works.com>
parents: 3840
diff changeset
423 m.connect("gists", "/gists",
1fdec7e3aeb2 refactored url.resource to full definition of routes
Marcin Kuzminski <marcin@python-works.com>
parents: 3840
diff changeset
424 action="index", conditions=dict(method=["GET"]))
1fdec7e3aeb2 refactored url.resource to full definition of routes
Marcin Kuzminski <marcin@python-works.com>
parents: 3840
diff changeset
425 m.connect("new_gist", "/gists/new",
1fdec7e3aeb2 refactored url.resource to full definition of routes
Marcin Kuzminski <marcin@python-works.com>
parents: 3840
diff changeset
426 action="new", conditions=dict(method=["GET"]))
4116
ffd45b185016 Imported some of the GPLv3'd changes from RhodeCode v2.2.5.
Bradley M. Kuhn <bkuhn@sfconservancy.org>
parents: 4043
diff changeset
427
ffd45b185016 Imported some of the GPLv3'd changes from RhodeCode v2.2.5.
Bradley M. Kuhn <bkuhn@sfconservancy.org>
parents: 4043
diff changeset
428
3882
2c5ceb546234 renamed gists routing to proper plural names
Marcin Kuzminski <marcin@python-works.com>
parents: 3874
diff changeset
429 m.connect("/gists/{gist_id}",
3866
1fdec7e3aeb2 refactored url.resource to full definition of routes
Marcin Kuzminski <marcin@python-works.com>
parents: 3840
diff changeset
430 action="update", conditions=dict(method=["PUT"]))
3882
2c5ceb546234 renamed gists routing to proper plural names
Marcin Kuzminski <marcin@python-works.com>
parents: 3874
diff changeset
431 m.connect("/gists/{gist_id}",
3866
1fdec7e3aeb2 refactored url.resource to full definition of routes
Marcin Kuzminski <marcin@python-works.com>
parents: 3840
diff changeset
432 action="delete", conditions=dict(method=["DELETE"]))
3882
2c5ceb546234 renamed gists routing to proper plural names
Marcin Kuzminski <marcin@python-works.com>
parents: 3874
diff changeset
433 m.connect("edit_gist", "/gists/{gist_id}/edit",
4116
ffd45b185016 Imported some of the GPLv3'd changes from RhodeCode v2.2.5.
Bradley M. Kuhn <bkuhn@sfconservancy.org>
parents: 4043
diff changeset
434 action="edit", conditions=dict(method=["GET", "POST"]))
ffd45b185016 Imported some of the GPLv3'd changes from RhodeCode v2.2.5.
Bradley M. Kuhn <bkuhn@sfconservancy.org>
parents: 4043
diff changeset
435 m.connect("edit_gist_check_revision", "/gists/{gist_id}/edit/check_revision",
ffd45b185016 Imported some of the GPLv3'd changes from RhodeCode v2.2.5.
Bradley M. Kuhn <bkuhn@sfconservancy.org>
parents: 4043
diff changeset
436 action="check_revision", conditions=dict(method=["POST"]))
ffd45b185016 Imported some of the GPLv3'd changes from RhodeCode v2.2.5.
Bradley M. Kuhn <bkuhn@sfconservancy.org>
parents: 4043
diff changeset
437
ffd45b185016 Imported some of the GPLv3'd changes from RhodeCode v2.2.5.
Bradley M. Kuhn <bkuhn@sfconservancy.org>
parents: 4043
diff changeset
438
3882
2c5ceb546234 renamed gists routing to proper plural names
Marcin Kuzminski <marcin@python-works.com>
parents: 3874
diff changeset
439 m.connect("gist", "/gists/{gist_id}",
3866
1fdec7e3aeb2 refactored url.resource to full definition of routes
Marcin Kuzminski <marcin@python-works.com>
parents: 3840
diff changeset
440 action="show", conditions=dict(method=["GET"]))
4116
ffd45b185016 Imported some of the GPLv3'd changes from RhodeCode v2.2.5.
Bradley M. Kuhn <bkuhn@sfconservancy.org>
parents: 4043
diff changeset
441 m.connect("gist_rev", "/gists/{gist_id}/{revision}",
ffd45b185016 Imported some of the GPLv3'd changes from RhodeCode v2.2.5.
Bradley M. Kuhn <bkuhn@sfconservancy.org>
parents: 4043
diff changeset
442 revision="tip",
3867
73f7149f2cc0 Added show as raw into gist
Marcin Kuzminski <marcin@python-works.com>
parents: 3866
diff changeset
443 action="show", conditions=dict(method=["GET"]))
4116
ffd45b185016 Imported some of the GPLv3'd changes from RhodeCode v2.2.5.
Bradley M. Kuhn <bkuhn@sfconservancy.org>
parents: 4043
diff changeset
444 m.connect("formatted_gist", "/gists/{gist_id}/{revision}/{format}",
ffd45b185016 Imported some of the GPLv3'd changes from RhodeCode v2.2.5.
Bradley M. Kuhn <bkuhn@sfconservancy.org>
parents: 4043
diff changeset
445 revision="tip",
ffd45b185016 Imported some of the GPLv3'd changes from RhodeCode v2.2.5.
Bradley M. Kuhn <bkuhn@sfconservancy.org>
parents: 4043
diff changeset
446 action="show", conditions=dict(method=["GET"]))
ffd45b185016 Imported some of the GPLv3'd changes from RhodeCode v2.2.5.
Bradley M. Kuhn <bkuhn@sfconservancy.org>
parents: 4043
diff changeset
447 m.connect("formatted_gist_file", "/gists/{gist_id}/{revision}/{format}/{f_path:.*}",
ffd45b185016 Imported some of the GPLv3'd changes from RhodeCode v2.2.5.
Bradley M. Kuhn <bkuhn@sfconservancy.org>
parents: 4043
diff changeset
448 revision='tip',
3866
1fdec7e3aeb2 refactored url.resource to full definition of routes
Marcin Kuzminski <marcin@python-works.com>
parents: 3840
diff changeset
449 action="show", conditions=dict(method=["GET"]))
1fdec7e3aeb2 refactored url.resource to full definition of routes
Marcin Kuzminski <marcin@python-works.com>
parents: 3840
diff changeset
450
604
5cc96df705b9 fixed @repo into :repo for docs
Marcin Kuzminski <marcin@python-works.com>
parents: 547
diff changeset
451 #ADMIN MAIN PAGES
1333
74aae890d33e refactor of routing to use one common prefix for admin, this way it's easier to change
Marcin Kuzminski <marcin@python-works.com>
parents: 1305
diff changeset
452 with rmap.submapper(path_prefix=ADMIN_PREFIX,
74aae890d33e refactor of routing to use one common prefix for admin, this way it's easier to change
Marcin Kuzminski <marcin@python-works.com>
parents: 1305
diff changeset
453 controller='admin/admin') as m:
1211
a7e7c0fab9db pep8ify
Marcin Kuzminski <marcin@python-works.com>
parents: 1205
diff changeset
454 m.connect('admin_home', '', action='index')
149
b3c93efd1c97 Updated template for summary (archives links)
Marcin Kuzminski <marcin@python-works.com>
parents: 148
diff changeset
455 m.connect('admin_add_repo', '/add_repo/{new_repo:[a-z0-9\. _-]*}',
b3c93efd1c97 Updated template for summary (archives links)
Marcin Kuzminski <marcin@python-works.com>
parents: 148
diff changeset
456 action='add_repo')
1445
c78f6bf52e9c Beginning of API implementation for rhodecode
Marcin Kuzminski <marcin@python-works.com>
parents: 1431
diff changeset
457 #==========================================================================
1982
87f0800abc7b #227 Initial version of repository groups permissions system
Marcin Kuzminski <marcin@python-works.com>
parents: 1818
diff changeset
458 # API V2
1445
c78f6bf52e9c Beginning of API implementation for rhodecode
Marcin Kuzminski <marcin@python-works.com>
parents: 1431
diff changeset
459 #==========================================================================
c78f6bf52e9c Beginning of API implementation for rhodecode
Marcin Kuzminski <marcin@python-works.com>
parents: 1431
diff changeset
460 with rmap.submapper(path_prefix=ADMIN_PREFIX,
c78f6bf52e9c Beginning of API implementation for rhodecode
Marcin Kuzminski <marcin@python-works.com>
parents: 1431
diff changeset
461 controller='api/api') as m:
c78f6bf52e9c Beginning of API implementation for rhodecode
Marcin Kuzminski <marcin@python-works.com>
parents: 1431
diff changeset
462 m.connect('api', '/api')
c78f6bf52e9c Beginning of API implementation for rhodecode
Marcin Kuzminski <marcin@python-works.com>
parents: 1431
diff changeset
463
1211
a7e7c0fab9db pep8ify
Marcin Kuzminski <marcin@python-works.com>
parents: 1205
diff changeset
464 #USER JOURNAL
2397
d815d617eb5e added rss/atom feeds into personalized journal
Marcin Kuzminski <marcin@python-works.com>
parents: 2390
diff changeset
465 rmap.connect('journal', '%s/journal' % ADMIN_PREFIX,
d815d617eb5e added rss/atom feeds into personalized journal
Marcin Kuzminski <marcin@python-works.com>
parents: 2390
diff changeset
466 controller='journal', action='index')
d815d617eb5e added rss/atom feeds into personalized journal
Marcin Kuzminski <marcin@python-works.com>
parents: 2390
diff changeset
467 rmap.connect('journal_rss', '%s/journal/rss' % ADMIN_PREFIX,
d815d617eb5e added rss/atom feeds into personalized journal
Marcin Kuzminski <marcin@python-works.com>
parents: 2390
diff changeset
468 controller='journal', action='journal_rss')
d815d617eb5e added rss/atom feeds into personalized journal
Marcin Kuzminski <marcin@python-works.com>
parents: 2390
diff changeset
469 rmap.connect('journal_atom', '%s/journal/atom' % ADMIN_PREFIX,
d815d617eb5e added rss/atom feeds into personalized journal
Marcin Kuzminski <marcin@python-works.com>
parents: 2390
diff changeset
470 controller='journal', action='journal_atom')
734
49eb69d78988 implemented user dashboards, and following system.
Marcin Kuzminski <marcin@python-works.com>
parents: 708
diff changeset
471
1333
74aae890d33e refactor of routing to use one common prefix for admin, this way it's easier to change
Marcin Kuzminski <marcin@python-works.com>
parents: 1305
diff changeset
472 rmap.connect('public_journal', '%s/public_journal' % ADMIN_PREFIX,
1211
a7e7c0fab9db pep8ify
Marcin Kuzminski <marcin@python-works.com>
parents: 1205
diff changeset
473 controller='journal', action="public_journal")
a7e7c0fab9db pep8ify
Marcin Kuzminski <marcin@python-works.com>
parents: 1205
diff changeset
474
2390
b0d09c20f608 public journal feed updates. fixes errors
Marcin Kuzminski <marcin@python-works.com>
parents: 2370
diff changeset
475 rmap.connect('public_journal_rss', '%s/public_journal/rss' % ADMIN_PREFIX,
b0d09c20f608 public journal feed updates. fixes errors
Marcin Kuzminski <marcin@python-works.com>
parents: 2370
diff changeset
476 controller='journal', action="public_journal_rss")
b0d09c20f608 public journal feed updates. fixes errors
Marcin Kuzminski <marcin@python-works.com>
parents: 2370
diff changeset
477
b0d09c20f608 public journal feed updates. fixes errors
Marcin Kuzminski <marcin@python-works.com>
parents: 2370
diff changeset
478 rmap.connect('public_journal_rss_old', '%s/public_journal_rss' % ADMIN_PREFIX,
1211
a7e7c0fab9db pep8ify
Marcin Kuzminski <marcin@python-works.com>
parents: 1205
diff changeset
479 controller='journal', action="public_journal_rss")
1088
fee472613dfa made simple global rss and atom feed
Marcin Kuzminski <marcin@python-works.com>
parents: 1085
diff changeset
480
1333
74aae890d33e refactor of routing to use one common prefix for admin, this way it's easier to change
Marcin Kuzminski <marcin@python-works.com>
parents: 1305
diff changeset
481 rmap.connect('public_journal_atom',
2390
b0d09c20f608 public journal feed updates. fixes errors
Marcin Kuzminski <marcin@python-works.com>
parents: 2370
diff changeset
482 '%s/public_journal/atom' % ADMIN_PREFIX, controller='journal',
b0d09c20f608 public journal feed updates. fixes errors
Marcin Kuzminski <marcin@python-works.com>
parents: 2370
diff changeset
483 action="public_journal_atom")
b0d09c20f608 public journal feed updates. fixes errors
Marcin Kuzminski <marcin@python-works.com>
parents: 2370
diff changeset
484
b0d09c20f608 public journal feed updates. fixes errors
Marcin Kuzminski <marcin@python-works.com>
parents: 2370
diff changeset
485 rmap.connect('public_journal_atom_old',
1333
74aae890d33e refactor of routing to use one common prefix for admin, this way it's easier to change
Marcin Kuzminski <marcin@python-works.com>
parents: 1305
diff changeset
486 '%s/public_journal_atom' % ADMIN_PREFIX, controller='journal',
74aae890d33e refactor of routing to use one common prefix for admin, this way it's easier to change
Marcin Kuzminski <marcin@python-works.com>
parents: 1305
diff changeset
487 action="public_journal_atom")
734
49eb69d78988 implemented user dashboards, and following system.
Marcin Kuzminski <marcin@python-works.com>
parents: 708
diff changeset
488
1333
74aae890d33e refactor of routing to use one common prefix for admin, this way it's easier to change
Marcin Kuzminski <marcin@python-works.com>
parents: 1305
diff changeset
489 rmap.connect('toggle_following', '%s/toggle_following' % ADMIN_PREFIX,
1211
a7e7c0fab9db pep8ify
Marcin Kuzminski <marcin@python-works.com>
parents: 1205
diff changeset
490 controller='journal', action='toggle_following',
a7e7c0fab9db pep8ify
Marcin Kuzminski <marcin@python-works.com>
parents: 1205
diff changeset
491 conditions=dict(method=["POST"]))
734
49eb69d78988 implemented user dashboards, and following system.
Marcin Kuzminski <marcin@python-works.com>
parents: 708
diff changeset
492
406
b153a51b1d3b Implemented search using whoosh. Still as experimental option.
Marcin Kuzminski <marcin@python-works.com>
parents: 380
diff changeset
493 #SEARCH
1333
74aae890d33e refactor of routing to use one common prefix for admin, this way it's easier to change
Marcin Kuzminski <marcin@python-works.com>
parents: 1305
diff changeset
494 rmap.connect('search', '%s/search' % ADMIN_PREFIX, controller='search',)
3289
666fc6ac9ce5 search: repo search is a repo thing - show it that way in ui and url
Mads Kiilerich <madski@unity3d.com>
parents: 3288
diff changeset
495 rmap.connect('search_repo_admin', '%s/search/{repo_name:.*}' % ADMIN_PREFIX,
3298
b38230cf8710 add condition check for old search url in admin
Marcin Kuzminski <marcin@python-works.com>
parents: 3289
diff changeset
496 controller='search',
b38230cf8710 add condition check for old search url in admin
Marcin Kuzminski <marcin@python-works.com>
parents: 3289
diff changeset
497 conditions=dict(function=check_repo))
3289
666fc6ac9ce5 search: repo search is a repo thing - show it that way in ui and url
Mads Kiilerich <madski@unity3d.com>
parents: 3288
diff changeset
498 rmap.connect('search_repo', '/{repo_name:.*?}/search',
666fc6ac9ce5 search: repo search is a repo thing - show it that way in ui and url
Mads Kiilerich <madski@unity3d.com>
parents: 3288
diff changeset
499 controller='search',
666fc6ac9ce5 search: repo search is a repo thing - show it that way in ui and url
Mads Kiilerich <madski@unity3d.com>
parents: 3288
diff changeset
500 conditions=dict(function=check_repo),
666fc6ac9ce5 search: repo search is a repo thing - show it that way in ui and url
Mads Kiilerich <madski@unity3d.com>
parents: 3288
diff changeset
501 )
604
5cc96df705b9 fixed @repo into :repo for docs
Marcin Kuzminski <marcin@python-works.com>
parents: 547
diff changeset
502
474
a3d9d24acbec Implemented password reset(forms/models/ tasks) and mailing tasks.
Marcin Kuzminski <marcin@python-works.com>
parents: 466
diff changeset
503 #LOGIN/LOGOUT/REGISTER/SIGN IN
1333
74aae890d33e refactor of routing to use one common prefix for admin, this way it's easier to change
Marcin Kuzminski <marcin@python-works.com>
parents: 1305
diff changeset
504 rmap.connect('login_home', '%s/login' % ADMIN_PREFIX, controller='login')
74aae890d33e refactor of routing to use one common prefix for admin, this way it's easier to change
Marcin Kuzminski <marcin@python-works.com>
parents: 1305
diff changeset
505 rmap.connect('logout_home', '%s/logout' % ADMIN_PREFIX, controller='login',
1211
a7e7c0fab9db pep8ify
Marcin Kuzminski <marcin@python-works.com>
parents: 1205
diff changeset
506 action='logout')
a7e7c0fab9db pep8ify
Marcin Kuzminski <marcin@python-works.com>
parents: 1205
diff changeset
507
1333
74aae890d33e refactor of routing to use one common prefix for admin, this way it's easier to change
Marcin Kuzminski <marcin@python-works.com>
parents: 1305
diff changeset
508 rmap.connect('register', '%s/register' % ADMIN_PREFIX, controller='login',
1211
a7e7c0fab9db pep8ify
Marcin Kuzminski <marcin@python-works.com>
parents: 1205
diff changeset
509 action='register')
a7e7c0fab9db pep8ify
Marcin Kuzminski <marcin@python-works.com>
parents: 1205
diff changeset
510
1333
74aae890d33e refactor of routing to use one common prefix for admin, this way it's easier to change
Marcin Kuzminski <marcin@python-works.com>
parents: 1305
diff changeset
511 rmap.connect('reset_password', '%s/password_reset' % ADMIN_PREFIX,
1211
a7e7c0fab9db pep8ify
Marcin Kuzminski <marcin@python-works.com>
parents: 1205
diff changeset
512 controller='login', action='password_reset')
604
5cc96df705b9 fixed @repo into :repo for docs
Marcin Kuzminski <marcin@python-works.com>
parents: 547
diff changeset
513
1417
5875955def39 fixes #223 improve password reset form
Marcin Kuzminski <marcin@python-works.com>
parents: 1348
diff changeset
514 rmap.connect('reset_password_confirmation',
5875955def39 fixes #223 improve password reset form
Marcin Kuzminski <marcin@python-works.com>
parents: 1348
diff changeset
515 '%s/password_reset_confirmation' % ADMIN_PREFIX,
5875955def39 fixes #223 improve password reset form
Marcin Kuzminski <marcin@python-works.com>
parents: 1348
diff changeset
516 controller='login', action='password_reset_confirmation')
5875955def39 fixes #223 improve password reset form
Marcin Kuzminski <marcin@python-works.com>
parents: 1348
diff changeset
517
205
66b20f525750 Added feed controllers, urls,and changed index page to use them.
Marcin Kuzminski <marcin@python-works.com>
parents: 181
diff changeset
518 #FEEDS
2692
1f75b23c3e26 switched repo_name to non greedy match.
Marcin Kuzminski <marcin@python-works.com>
parents: 2631
diff changeset
519 rmap.connect('rss_feed_home', '/{repo_name:.*?}/feed/rss',
300
8f7b8e965fe4 fixed 404s added extra validator for magic repo_name path in routes
Marcin Kuzminski <marcin@python-works.com>
parents: 299
diff changeset
520 controller='feed', action='rss',
8f7b8e965fe4 fixed 404s added extra validator for magic repo_name path in routes
Marcin Kuzminski <marcin@python-works.com>
parents: 299
diff changeset
521 conditions=dict(function=check_repo))
1211
a7e7c0fab9db pep8ify
Marcin Kuzminski <marcin@python-works.com>
parents: 1205
diff changeset
522
2692
1f75b23c3e26 switched repo_name to non greedy match.
Marcin Kuzminski <marcin@python-works.com>
parents: 2631
diff changeset
523 rmap.connect('atom_feed_home', '/{repo_name:.*?}/feed/atom',
300
8f7b8e965fe4 fixed 404s added extra validator for magic repo_name path in routes
Marcin Kuzminski <marcin@python-works.com>
parents: 299
diff changeset
524 controller='feed', action='atom',
8f7b8e965fe4 fixed 404s added extra validator for magic repo_name path in routes
Marcin Kuzminski <marcin@python-works.com>
parents: 299
diff changeset
525 conditions=dict(function=check_repo))
604
5cc96df705b9 fixed @repo into :repo for docs
Marcin Kuzminski <marcin@python-works.com>
parents: 547
diff changeset
526
1279
cb216757a62d #179 Added followers page
Marcin Kuzminski <marcin@python-works.com>
parents: 1271
diff changeset
527 #==========================================================================
cb216757a62d #179 Added followers page
Marcin Kuzminski <marcin@python-works.com>
parents: 1271
diff changeset
528 # REPOSITORY ROUTES
cb216757a62d #179 Added followers page
Marcin Kuzminski <marcin@python-works.com>
parents: 1271
diff changeset
529 #==========================================================================
4116
ffd45b185016 Imported some of the GPLv3'd changes from RhodeCode v2.2.5.
Bradley M. Kuhn <bkuhn@sfconservancy.org>
parents: 4043
diff changeset
530 rmap.connect('repo_creating_home', '/{repo_name:.*?}/repo_creating',
ffd45b185016 Imported some of the GPLv3'd changes from RhodeCode v2.2.5.
Bradley M. Kuhn <bkuhn@sfconservancy.org>
parents: 4043
diff changeset
531 controller='admin/repos', action='repo_creating')
ffd45b185016 Imported some of the GPLv3'd changes from RhodeCode v2.2.5.
Bradley M. Kuhn <bkuhn@sfconservancy.org>
parents: 4043
diff changeset
532 rmap.connect('repo_check_home', '/{repo_name:.*?}/crepo_check',
ffd45b185016 Imported some of the GPLv3'd changes from RhodeCode v2.2.5.
Bradley M. Kuhn <bkuhn@sfconservancy.org>
parents: 4043
diff changeset
533 controller='admin/repos', action='repo_check')
ffd45b185016 Imported some of the GPLv3'd changes from RhodeCode v2.2.5.
Bradley M. Kuhn <bkuhn@sfconservancy.org>
parents: 4043
diff changeset
534
2692
1f75b23c3e26 switched repo_name to non greedy match.
Marcin Kuzminski <marcin@python-works.com>
parents: 2631
diff changeset
535 rmap.connect('summary_home', '/{repo_name:.*?}',
1538
27be8f94c207 implements #226 repo groups available by path
Marcin Kuzminski <marcin@python-works.com>
parents: 1507
diff changeset
536 controller='summary',
1505
bb6ba7442293 Fixed methods for checking if path in routes is a repo
Marcin Kuzminski <marcin@python-works.com>
parents: 1483
diff changeset
537 conditions=dict(function=check_repo))
1538
27be8f94c207 implements #226 repo groups available by path
Marcin Kuzminski <marcin@python-works.com>
parents: 1507
diff changeset
538
4116
ffd45b185016 Imported some of the GPLv3'd changes from RhodeCode v2.2.5.
Bradley M. Kuhn <bkuhn@sfconservancy.org>
parents: 4043
diff changeset
539 # must be here for proper group/repo catching
ffd45b185016 Imported some of the GPLv3'd changes from RhodeCode v2.2.5.
Bradley M. Kuhn <bkuhn@sfconservancy.org>
parents: 4043
diff changeset
540 rmap.connect('repos_group_home', '/{group_name:.*}',
ffd45b185016 Imported some of the GPLv3'd changes from RhodeCode v2.2.5.
Bradley M. Kuhn <bkuhn@sfconservancy.org>
parents: 4043
diff changeset
541 controller='admin/repo_groups', action="show_by_name",
ffd45b185016 Imported some of the GPLv3'd changes from RhodeCode v2.2.5.
Bradley M. Kuhn <bkuhn@sfconservancy.org>
parents: 4043
diff changeset
542 conditions=dict(function=check_group))
ffd45b185016 Imported some of the GPLv3'd changes from RhodeCode v2.2.5.
Bradley M. Kuhn <bkuhn@sfconservancy.org>
parents: 4043
diff changeset
543 rmap.connect('repo_stats_home', '/{repo_name:.*?}/statistics',
ffd45b185016 Imported some of the GPLv3'd changes from RhodeCode v2.2.5.
Bradley M. Kuhn <bkuhn@sfconservancy.org>
parents: 4043
diff changeset
544 controller='summary', action='statistics',
ffd45b185016 Imported some of the GPLv3'd changes from RhodeCode v2.2.5.
Bradley M. Kuhn <bkuhn@sfconservancy.org>
parents: 4043
diff changeset
545 conditions=dict(function=check_repo))
ffd45b185016 Imported some of the GPLv3'd changes from RhodeCode v2.2.5.
Bradley M. Kuhn <bkuhn@sfconservancy.org>
parents: 4043
diff changeset
546
3246
b9ba0d4d3abf implemented #83 show repo size on summary page
Marcin Kuzminski <marcin@python-works.com>
parents: 3222
diff changeset
547 rmap.connect('repo_size', '/{repo_name:.*?}/repo_size',
b9ba0d4d3abf implemented #83 show repo size on summary page
Marcin Kuzminski <marcin@python-works.com>
parents: 3222
diff changeset
548 controller='summary', action='repo_size',
b9ba0d4d3abf implemented #83 show repo size on summary page
Marcin Kuzminski <marcin@python-works.com>
parents: 3222
diff changeset
549 conditions=dict(function=check_repo))
b9ba0d4d3abf implemented #83 show repo size on summary page
Marcin Kuzminski <marcin@python-works.com>
parents: 3222
diff changeset
550
4116
ffd45b185016 Imported some of the GPLv3'd changes from RhodeCode v2.2.5.
Bradley M. Kuhn <bkuhn@sfconservancy.org>
parents: 4043
diff changeset
551 rmap.connect('branch_tag_switcher', '/{repo_name:.*?}/branches-tags',
ffd45b185016 Imported some of the GPLv3'd changes from RhodeCode v2.2.5.
Bradley M. Kuhn <bkuhn@sfconservancy.org>
parents: 4043
diff changeset
552 controller='home', action='branch_tag_switcher')
ffd45b185016 Imported some of the GPLv3'd changes from RhodeCode v2.2.5.
Bradley M. Kuhn <bkuhn@sfconservancy.org>
parents: 4043
diff changeset
553 rmap.connect('repo_refs_data', '/{repo_name:.*?}/refs-data',
ffd45b185016 Imported some of the GPLv3'd changes from RhodeCode v2.2.5.
Bradley M. Kuhn <bkuhn@sfconservancy.org>
parents: 4043
diff changeset
554 controller='home', action='repo_refs_data')
1538
27be8f94c207 implements #226 repo groups available by path
Marcin Kuzminski <marcin@python-works.com>
parents: 1507
diff changeset
555
2692
1f75b23c3e26 switched repo_name to non greedy match.
Marcin Kuzminski <marcin@python-works.com>
parents: 2631
diff changeset
556 rmap.connect('changeset_home', '/{repo_name:.*?}/changeset/{revision}',
300
8f7b8e965fe4 fixed 404s added extra validator for magic repo_name path in routes
Marcin Kuzminski <marcin@python-works.com>
parents: 299
diff changeset
557 controller='changeset', revision='tip',
8f7b8e965fe4 fixed 404s added extra validator for magic repo_name path in routes
Marcin Kuzminski <marcin@python-works.com>
parents: 299
diff changeset
558 conditions=dict(function=check_repo))
4116
ffd45b185016 Imported some of the GPLv3'd changes from RhodeCode v2.2.5.
Bradley M. Kuhn <bkuhn@sfconservancy.org>
parents: 4043
diff changeset
559 rmap.connect('changeset_children', '/{repo_name:.*?}/changeset_children/{revision}',
ffd45b185016 Imported some of the GPLv3'd changes from RhodeCode v2.2.5.
Bradley M. Kuhn <bkuhn@sfconservancy.org>
parents: 4043
diff changeset
560 controller='changeset', revision='tip', action="changeset_children",
ffd45b185016 Imported some of the GPLv3'd changes from RhodeCode v2.2.5.
Bradley M. Kuhn <bkuhn@sfconservancy.org>
parents: 4043
diff changeset
561 conditions=dict(function=check_repo))
ffd45b185016 Imported some of the GPLv3'd changes from RhodeCode v2.2.5.
Bradley M. Kuhn <bkuhn@sfconservancy.org>
parents: 4043
diff changeset
562 rmap.connect('changeset_parents', '/{repo_name:.*?}/changeset_parents/{revision}',
ffd45b185016 Imported some of the GPLv3'd changes from RhodeCode v2.2.5.
Bradley M. Kuhn <bkuhn@sfconservancy.org>
parents: 4043
diff changeset
563 controller='changeset', revision='tip', action="changeset_parents",
ffd45b185016 Imported some of the GPLv3'd changes from RhodeCode v2.2.5.
Bradley M. Kuhn <bkuhn@sfconservancy.org>
parents: 4043
diff changeset
564 conditions=dict(function=check_repo))
1211
a7e7c0fab9db pep8ify
Marcin Kuzminski <marcin@python-works.com>
parents: 1205
diff changeset
565
4116
ffd45b185016 Imported some of the GPLv3'd changes from RhodeCode v2.2.5.
Bradley M. Kuhn <bkuhn@sfconservancy.org>
parents: 4043
diff changeset
566 # repo edit options
3629
802c94bdfc85 #749 and #516 Removed dupliciting of repo settings for rhodecode admins and repo admins
Marcin Kuzminski <marcin@python-works.com>
parents: 3628
diff changeset
567 rmap.connect("edit_repo", "/{repo_name:.*?}/settings",
3288
6cdf2cd9d9d8 repo edit: it is a repo thing more than an admin thing - show it that way in ui and url
Mads Kiilerich <madski@unity3d.com>
parents: 3283
diff changeset
568 controller='admin/repos', action="edit",
4116
ffd45b185016 Imported some of the GPLv3'd changes from RhodeCode v2.2.5.
Bradley M. Kuhn <bkuhn@sfconservancy.org>
parents: 4043
diff changeset
569 conditions=dict(method=["GET"], function=check_repo))
ffd45b185016 Imported some of the GPLv3'd changes from RhodeCode v2.2.5.
Bradley M. Kuhn <bkuhn@sfconservancy.org>
parents: 4043
diff changeset
570
ffd45b185016 Imported some of the GPLv3'd changes from RhodeCode v2.2.5.
Bradley M. Kuhn <bkuhn@sfconservancy.org>
parents: 4043
diff changeset
571 rmap.connect("edit_repo_perms", "/{repo_name:.*?}/settings/permissions",
ffd45b185016 Imported some of the GPLv3'd changes from RhodeCode v2.2.5.
Bradley M. Kuhn <bkuhn@sfconservancy.org>
parents: 4043
diff changeset
572 controller='admin/repos', action="edit_permissions",
ffd45b185016 Imported some of the GPLv3'd changes from RhodeCode v2.2.5.
Bradley M. Kuhn <bkuhn@sfconservancy.org>
parents: 4043
diff changeset
573 conditions=dict(method=["GET"], function=check_repo))
ffd45b185016 Imported some of the GPLv3'd changes from RhodeCode v2.2.5.
Bradley M. Kuhn <bkuhn@sfconservancy.org>
parents: 4043
diff changeset
574 rmap.connect("edit_repo_perms_update", "/{repo_name:.*?}/settings/permissions",
ffd45b185016 Imported some of the GPLv3'd changes from RhodeCode v2.2.5.
Bradley M. Kuhn <bkuhn@sfconservancy.org>
parents: 4043
diff changeset
575 controller='admin/repos', action="edit_permissions_update",
ffd45b185016 Imported some of the GPLv3'd changes from RhodeCode v2.2.5.
Bradley M. Kuhn <bkuhn@sfconservancy.org>
parents: 4043
diff changeset
576 conditions=dict(method=["PUT"], function=check_repo))
ffd45b185016 Imported some of the GPLv3'd changes from RhodeCode v2.2.5.
Bradley M. Kuhn <bkuhn@sfconservancy.org>
parents: 4043
diff changeset
577 rmap.connect("edit_repo_perms_revoke", "/{repo_name:.*?}/settings/permissions",
ffd45b185016 Imported some of the GPLv3'd changes from RhodeCode v2.2.5.
Bradley M. Kuhn <bkuhn@sfconservancy.org>
parents: 4043
diff changeset
578 controller='admin/repos', action="edit_permissions_revoke",
ffd45b185016 Imported some of the GPLv3'd changes from RhodeCode v2.2.5.
Bradley M. Kuhn <bkuhn@sfconservancy.org>
parents: 4043
diff changeset
579 conditions=dict(method=["DELETE"], function=check_repo))
ffd45b185016 Imported some of the GPLv3'd changes from RhodeCode v2.2.5.
Bradley M. Kuhn <bkuhn@sfconservancy.org>
parents: 4043
diff changeset
580
ffd45b185016 Imported some of the GPLv3'd changes from RhodeCode v2.2.5.
Bradley M. Kuhn <bkuhn@sfconservancy.org>
parents: 4043
diff changeset
581 rmap.connect("edit_repo_fields", "/{repo_name:.*?}/settings/fields",
ffd45b185016 Imported some of the GPLv3'd changes from RhodeCode v2.2.5.
Bradley M. Kuhn <bkuhn@sfconservancy.org>
parents: 4043
diff changeset
582 controller='admin/repos', action="edit_fields",
ffd45b185016 Imported some of the GPLv3'd changes from RhodeCode v2.2.5.
Bradley M. Kuhn <bkuhn@sfconservancy.org>
parents: 4043
diff changeset
583 conditions=dict(method=["GET"], function=check_repo))
ffd45b185016 Imported some of the GPLv3'd changes from RhodeCode v2.2.5.
Bradley M. Kuhn <bkuhn@sfconservancy.org>
parents: 4043
diff changeset
584 rmap.connect('create_repo_fields', "/{repo_name:.*?}/settings/fields/new",
ffd45b185016 Imported some of the GPLv3'd changes from RhodeCode v2.2.5.
Bradley M. Kuhn <bkuhn@sfconservancy.org>
parents: 4043
diff changeset
585 controller='admin/repos', action="create_repo_field",
ffd45b185016 Imported some of the GPLv3'd changes from RhodeCode v2.2.5.
Bradley M. Kuhn <bkuhn@sfconservancy.org>
parents: 4043
diff changeset
586 conditions=dict(method=["PUT"], function=check_repo))
ffd45b185016 Imported some of the GPLv3'd changes from RhodeCode v2.2.5.
Bradley M. Kuhn <bkuhn@sfconservancy.org>
parents: 4043
diff changeset
587 rmap.connect('delete_repo_fields', "/{repo_name:.*?}/settings/fields/{field_id}",
ffd45b185016 Imported some of the GPLv3'd changes from RhodeCode v2.2.5.
Bradley M. Kuhn <bkuhn@sfconservancy.org>
parents: 4043
diff changeset
588 controller='admin/repos', action="delete_repo_field",
ffd45b185016 Imported some of the GPLv3'd changes from RhodeCode v2.2.5.
Bradley M. Kuhn <bkuhn@sfconservancy.org>
parents: 4043
diff changeset
589 conditions=dict(method=["DELETE"], function=check_repo))
ffd45b185016 Imported some of the GPLv3'd changes from RhodeCode v2.2.5.
Bradley M. Kuhn <bkuhn@sfconservancy.org>
parents: 4043
diff changeset
590
ffd45b185016 Imported some of the GPLv3'd changes from RhodeCode v2.2.5.
Bradley M. Kuhn <bkuhn@sfconservancy.org>
parents: 4043
diff changeset
591
ffd45b185016 Imported some of the GPLv3'd changes from RhodeCode v2.2.5.
Bradley M. Kuhn <bkuhn@sfconservancy.org>
parents: 4043
diff changeset
592 rmap.connect("edit_repo_advanced", "/{repo_name:.*?}/settings/advanced",
ffd45b185016 Imported some of the GPLv3'd changes from RhodeCode v2.2.5.
Bradley M. Kuhn <bkuhn@sfconservancy.org>
parents: 4043
diff changeset
593 controller='admin/repos', action="edit_advanced",
ffd45b185016 Imported some of the GPLv3'd changes from RhodeCode v2.2.5.
Bradley M. Kuhn <bkuhn@sfconservancy.org>
parents: 4043
diff changeset
594 conditions=dict(method=["GET"], function=check_repo))
ffd45b185016 Imported some of the GPLv3'd changes from RhodeCode v2.2.5.
Bradley M. Kuhn <bkuhn@sfconservancy.org>
parents: 4043
diff changeset
595
ffd45b185016 Imported some of the GPLv3'd changes from RhodeCode v2.2.5.
Bradley M. Kuhn <bkuhn@sfconservancy.org>
parents: 4043
diff changeset
596 rmap.connect("edit_repo_advanced_locking", "/{repo_name:.*?}/settings/advanced/locking",
ffd45b185016 Imported some of the GPLv3'd changes from RhodeCode v2.2.5.
Bradley M. Kuhn <bkuhn@sfconservancy.org>
parents: 4043
diff changeset
597 controller='admin/repos', action="edit_advanced_locking",
ffd45b185016 Imported some of the GPLv3'd changes from RhodeCode v2.2.5.
Bradley M. Kuhn <bkuhn@sfconservancy.org>
parents: 4043
diff changeset
598 conditions=dict(method=["PUT"], function=check_repo))
ffd45b185016 Imported some of the GPLv3'd changes from RhodeCode v2.2.5.
Bradley M. Kuhn <bkuhn@sfconservancy.org>
parents: 4043
diff changeset
599 rmap.connect('toggle_locking', "/{repo_name:.*?}/settings/advanced/locking_toggle",
ffd45b185016 Imported some of the GPLv3'd changes from RhodeCode v2.2.5.
Bradley M. Kuhn <bkuhn@sfconservancy.org>
parents: 4043
diff changeset
600 controller='admin/repos', action="toggle_locking",
ffd45b185016 Imported some of the GPLv3'd changes from RhodeCode v2.2.5.
Bradley M. Kuhn <bkuhn@sfconservancy.org>
parents: 4043
diff changeset
601 conditions=dict(method=["GET"], function=check_repo))
ffd45b185016 Imported some of the GPLv3'd changes from RhodeCode v2.2.5.
Bradley M. Kuhn <bkuhn@sfconservancy.org>
parents: 4043
diff changeset
602
ffd45b185016 Imported some of the GPLv3'd changes from RhodeCode v2.2.5.
Bradley M. Kuhn <bkuhn@sfconservancy.org>
parents: 4043
diff changeset
603 rmap.connect("edit_repo_advanced_journal", "/{repo_name:.*?}/settings/advanced/journal",
ffd45b185016 Imported some of the GPLv3'd changes from RhodeCode v2.2.5.
Bradley M. Kuhn <bkuhn@sfconservancy.org>
parents: 4043
diff changeset
604 controller='admin/repos', action="edit_advanced_journal",
ffd45b185016 Imported some of the GPLv3'd changes from RhodeCode v2.2.5.
Bradley M. Kuhn <bkuhn@sfconservancy.org>
parents: 4043
diff changeset
605 conditions=dict(method=["PUT"], function=check_repo))
ffd45b185016 Imported some of the GPLv3'd changes from RhodeCode v2.2.5.
Bradley M. Kuhn <bkuhn@sfconservancy.org>
parents: 4043
diff changeset
606
ffd45b185016 Imported some of the GPLv3'd changes from RhodeCode v2.2.5.
Bradley M. Kuhn <bkuhn@sfconservancy.org>
parents: 4043
diff changeset
607 rmap.connect("edit_repo_advanced_fork", "/{repo_name:.*?}/settings/advanced/fork",
ffd45b185016 Imported some of the GPLv3'd changes from RhodeCode v2.2.5.
Bradley M. Kuhn <bkuhn@sfconservancy.org>
parents: 4043
diff changeset
608 controller='admin/repos', action="edit_advanced_fork",
ffd45b185016 Imported some of the GPLv3'd changes from RhodeCode v2.2.5.
Bradley M. Kuhn <bkuhn@sfconservancy.org>
parents: 4043
diff changeset
609 conditions=dict(method=["PUT"], function=check_repo))
ffd45b185016 Imported some of the GPLv3'd changes from RhodeCode v2.2.5.
Bradley M. Kuhn <bkuhn@sfconservancy.org>
parents: 4043
diff changeset
610
ffd45b185016 Imported some of the GPLv3'd changes from RhodeCode v2.2.5.
Bradley M. Kuhn <bkuhn@sfconservancy.org>
parents: 4043
diff changeset
611
ffd45b185016 Imported some of the GPLv3'd changes from RhodeCode v2.2.5.
Bradley M. Kuhn <bkuhn@sfconservancy.org>
parents: 4043
diff changeset
612 rmap.connect("edit_repo_caches", "/{repo_name:.*?}/settings/caches",
ffd45b185016 Imported some of the GPLv3'd changes from RhodeCode v2.2.5.
Bradley M. Kuhn <bkuhn@sfconservancy.org>
parents: 4043
diff changeset
613 controller='admin/repos', action="edit_caches",
ffd45b185016 Imported some of the GPLv3'd changes from RhodeCode v2.2.5.
Bradley M. Kuhn <bkuhn@sfconservancy.org>
parents: 4043
diff changeset
614 conditions=dict(method=["GET"], function=check_repo))
ffd45b185016 Imported some of the GPLv3'd changes from RhodeCode v2.2.5.
Bradley M. Kuhn <bkuhn@sfconservancy.org>
parents: 4043
diff changeset
615 rmap.connect("edit_repo_caches", "/{repo_name:.*?}/settings/caches",
ffd45b185016 Imported some of the GPLv3'd changes from RhodeCode v2.2.5.
Bradley M. Kuhn <bkuhn@sfconservancy.org>
parents: 4043
diff changeset
616 controller='admin/repos', action="edit_caches",
ffd45b185016 Imported some of the GPLv3'd changes from RhodeCode v2.2.5.
Bradley M. Kuhn <bkuhn@sfconservancy.org>
parents: 4043
diff changeset
617 conditions=dict(method=["PUT"], function=check_repo))
ffd45b185016 Imported some of the GPLv3'd changes from RhodeCode v2.2.5.
Bradley M. Kuhn <bkuhn@sfconservancy.org>
parents: 4043
diff changeset
618
ffd45b185016 Imported some of the GPLv3'd changes from RhodeCode v2.2.5.
Bradley M. Kuhn <bkuhn@sfconservancy.org>
parents: 4043
diff changeset
619
ffd45b185016 Imported some of the GPLv3'd changes from RhodeCode v2.2.5.
Bradley M. Kuhn <bkuhn@sfconservancy.org>
parents: 4043
diff changeset
620 rmap.connect("edit_repo_remote", "/{repo_name:.*?}/settings/remote",
ffd45b185016 Imported some of the GPLv3'd changes from RhodeCode v2.2.5.
Bradley M. Kuhn <bkuhn@sfconservancy.org>
parents: 4043
diff changeset
621 controller='admin/repos', action="edit_remote",
ffd45b185016 Imported some of the GPLv3'd changes from RhodeCode v2.2.5.
Bradley M. Kuhn <bkuhn@sfconservancy.org>
parents: 4043
diff changeset
622 conditions=dict(method=["GET"], function=check_repo))
ffd45b185016 Imported some of the GPLv3'd changes from RhodeCode v2.2.5.
Bradley M. Kuhn <bkuhn@sfconservancy.org>
parents: 4043
diff changeset
623 rmap.connect("edit_repo_remote", "/{repo_name:.*?}/settings/remote",
ffd45b185016 Imported some of the GPLv3'd changes from RhodeCode v2.2.5.
Bradley M. Kuhn <bkuhn@sfconservancy.org>
parents: 4043
diff changeset
624 controller='admin/repos', action="edit_remote",
ffd45b185016 Imported some of the GPLv3'd changes from RhodeCode v2.2.5.
Bradley M. Kuhn <bkuhn@sfconservancy.org>
parents: 4043
diff changeset
625 conditions=dict(method=["PUT"], function=check_repo))
ffd45b185016 Imported some of the GPLv3'd changes from RhodeCode v2.2.5.
Bradley M. Kuhn <bkuhn@sfconservancy.org>
parents: 4043
diff changeset
626
ffd45b185016 Imported some of the GPLv3'd changes from RhodeCode v2.2.5.
Bradley M. Kuhn <bkuhn@sfconservancy.org>
parents: 4043
diff changeset
627 rmap.connect("edit_repo_statistics", "/{repo_name:.*?}/settings/statistics",
ffd45b185016 Imported some of the GPLv3'd changes from RhodeCode v2.2.5.
Bradley M. Kuhn <bkuhn@sfconservancy.org>
parents: 4043
diff changeset
628 controller='admin/repos', action="edit_statistics",
ffd45b185016 Imported some of the GPLv3'd changes from RhodeCode v2.2.5.
Bradley M. Kuhn <bkuhn@sfconservancy.org>
parents: 4043
diff changeset
629 conditions=dict(method=["GET"], function=check_repo))
ffd45b185016 Imported some of the GPLv3'd changes from RhodeCode v2.2.5.
Bradley M. Kuhn <bkuhn@sfconservancy.org>
parents: 4043
diff changeset
630 rmap.connect("edit_repo_statistics", "/{repo_name:.*?}/settings/statistics",
ffd45b185016 Imported some of the GPLv3'd changes from RhodeCode v2.2.5.
Bradley M. Kuhn <bkuhn@sfconservancy.org>
parents: 4043
diff changeset
631 controller='admin/repos', action="edit_statistics",
ffd45b185016 Imported some of the GPLv3'd changes from RhodeCode v2.2.5.
Bradley M. Kuhn <bkuhn@sfconservancy.org>
parents: 4043
diff changeset
632 conditions=dict(method=["PUT"], function=check_repo))
3288
6cdf2cd9d9d8 repo edit: it is a repo thing more than an admin thing - show it that way in ui and url
Mads Kiilerich <madski@unity3d.com>
parents: 3283
diff changeset
633
2996
ebe3e388bbb3 new patch function, and urls schema.
Marcin Kuzminski <marcin@python-works.com>
parents: 2971
diff changeset
634 #still working url for backward compat.
ebe3e388bbb3 new patch function, and urls schema.
Marcin Kuzminski <marcin@python-works.com>
parents: 2971
diff changeset
635 rmap.connect('raw_changeset_home_depraced',
ebe3e388bbb3 new patch function, and urls schema.
Marcin Kuzminski <marcin@python-works.com>
parents: 2971
diff changeset
636 '/{repo_name:.*?}/raw-changeset/{revision}',
ebe3e388bbb3 new patch function, and urls schema.
Marcin Kuzminski <marcin@python-works.com>
parents: 2971
diff changeset
637 controller='changeset', action='changeset_raw',
ebe3e388bbb3 new patch function, and urls schema.
Marcin Kuzminski <marcin@python-works.com>
parents: 2971
diff changeset
638 revision='tip', conditions=dict(function=check_repo))
ebe3e388bbb3 new patch function, and urls schema.
Marcin Kuzminski <marcin@python-works.com>
parents: 2971
diff changeset
639
ebe3e388bbb3 new patch function, and urls schema.
Marcin Kuzminski <marcin@python-works.com>
parents: 2971
diff changeset
640 ## new URLs
ebe3e388bbb3 new patch function, and urls schema.
Marcin Kuzminski <marcin@python-works.com>
parents: 2971
diff changeset
641 rmap.connect('changeset_raw_home',
ebe3e388bbb3 new patch function, and urls schema.
Marcin Kuzminski <marcin@python-works.com>
parents: 2971
diff changeset
642 '/{repo_name:.*?}/changeset-diff/{revision}',
ebe3e388bbb3 new patch function, and urls schema.
Marcin Kuzminski <marcin@python-works.com>
parents: 2971
diff changeset
643 controller='changeset', action='changeset_raw',
ebe3e388bbb3 new patch function, and urls schema.
Marcin Kuzminski <marcin@python-works.com>
parents: 2971
diff changeset
644 revision='tip', conditions=dict(function=check_repo))
ebe3e388bbb3 new patch function, and urls schema.
Marcin Kuzminski <marcin@python-works.com>
parents: 2971
diff changeset
645
ebe3e388bbb3 new patch function, and urls schema.
Marcin Kuzminski <marcin@python-works.com>
parents: 2971
diff changeset
646 rmap.connect('changeset_patch_home',
ebe3e388bbb3 new patch function, and urls schema.
Marcin Kuzminski <marcin@python-works.com>
parents: 2971
diff changeset
647 '/{repo_name:.*?}/changeset-patch/{revision}',
ebe3e388bbb3 new patch function, and urls schema.
Marcin Kuzminski <marcin@python-works.com>
parents: 2971
diff changeset
648 controller='changeset', action='changeset_patch',
ebe3e388bbb3 new patch function, and urls schema.
Marcin Kuzminski <marcin@python-works.com>
parents: 2971
diff changeset
649 revision='tip', conditions=dict(function=check_repo))
ebe3e388bbb3 new patch function, and urls schema.
Marcin Kuzminski <marcin@python-works.com>
parents: 2971
diff changeset
650
ebe3e388bbb3 new patch function, and urls schema.
Marcin Kuzminski <marcin@python-works.com>
parents: 2971
diff changeset
651 rmap.connect('changeset_download_home',
ebe3e388bbb3 new patch function, and urls schema.
Marcin Kuzminski <marcin@python-works.com>
parents: 2971
diff changeset
652 '/{repo_name:.*?}/changeset-download/{revision}',
ebe3e388bbb3 new patch function, and urls schema.
Marcin Kuzminski <marcin@python-works.com>
parents: 2971
diff changeset
653 controller='changeset', action='changeset_download',
ebe3e388bbb3 new patch function, and urls schema.
Marcin Kuzminski <marcin@python-works.com>
parents: 2971
diff changeset
654 revision='tip', conditions=dict(function=check_repo))
ebe3e388bbb3 new patch function, and urls schema.
Marcin Kuzminski <marcin@python-works.com>
parents: 2971
diff changeset
655
1982
87f0800abc7b #227 Initial version of repository groups permissions system
Marcin Kuzminski <marcin@python-works.com>
parents: 1818
diff changeset
656 rmap.connect('changeset_comment',
2692
1f75b23c3e26 switched repo_name to non greedy match.
Marcin Kuzminski <marcin@python-works.com>
parents: 2631
diff changeset
657 '/{repo_name:.*?}/changeset/{revision}/comment',
1670
d2de0c2f02cd #77 code review
Marcin Kuzminski <marcin@python-works.com>
parents: 1608
diff changeset
658 controller='changeset', revision='tip', action='comment',
d2de0c2f02cd #77 code review
Marcin Kuzminski <marcin@python-works.com>
parents: 1608
diff changeset
659 conditions=dict(function=check_repo))
d2de0c2f02cd #77 code review
Marcin Kuzminski <marcin@python-works.com>
parents: 1608
diff changeset
660
3695
45df84d36b44 Implemented preview for comments
Marcin Kuzminski <marcin@python-works.com>
parents: 3659
diff changeset
661 rmap.connect('changeset_comment_preview',
45df84d36b44 Implemented preview for comments
Marcin Kuzminski <marcin@python-works.com>
parents: 3659
diff changeset
662 '/{repo_name:.*?}/changeset/comment/preview',
45df84d36b44 Implemented preview for comments
Marcin Kuzminski <marcin@python-works.com>
parents: 3659
diff changeset
663 controller='changeset', action='preview_comment',
45df84d36b44 Implemented preview for comments
Marcin Kuzminski <marcin@python-works.com>
parents: 3659
diff changeset
664 conditions=dict(function=check_repo, method=["POST"]))
45df84d36b44 Implemented preview for comments
Marcin Kuzminski <marcin@python-works.com>
parents: 3659
diff changeset
665
1982
87f0800abc7b #227 Initial version of repository groups permissions system
Marcin Kuzminski <marcin@python-works.com>
parents: 1818
diff changeset
666 rmap.connect('changeset_comment_delete',
2692
1f75b23c3e26 switched repo_name to non greedy match.
Marcin Kuzminski <marcin@python-works.com>
parents: 2631
diff changeset
667 '/{repo_name:.*?}/changeset/comment/{comment_id}/delete',
1670
d2de0c2f02cd #77 code review
Marcin Kuzminski <marcin@python-works.com>
parents: 1608
diff changeset
668 controller='changeset', action='delete_comment',
1712
cac5109ac3b6 Notification system improvements
Marcin Kuzminski <marcin@python-works.com>
parents: 1702
diff changeset
669 conditions=dict(function=check_repo, method=["DELETE"]))
1670
d2de0c2f02cd #77 code review
Marcin Kuzminski <marcin@python-works.com>
parents: 1608
diff changeset
670
2971
2bfcec6a3985 new tooltip implementation
Marcin Kuzminski <marcin@python-works.com>
parents: 2951
diff changeset
671 rmap.connect('changeset_info', '/changeset_info/{repo_name:.*?}/{revision}',
2bfcec6a3985 new tooltip implementation
Marcin Kuzminski <marcin@python-works.com>
parents: 2951
diff changeset
672 controller='changeset', action='changeset_info')
2bfcec6a3985 new tooltip implementation
Marcin Kuzminski <marcin@python-works.com>
parents: 2951
diff changeset
673
4116
ffd45b185016 Imported some of the GPLv3'd changes from RhodeCode v2.2.5.
Bradley M. Kuhn <bkuhn@sfconservancy.org>
parents: 4043
diff changeset
674 rmap.connect('compare_home',
ffd45b185016 Imported some of the GPLv3'd changes from RhodeCode v2.2.5.
Bradley M. Kuhn <bkuhn@sfconservancy.org>
parents: 4043
diff changeset
675 '/{repo_name:.*?}/compare',
ffd45b185016 Imported some of the GPLv3'd changes from RhodeCode v2.2.5.
Bradley M. Kuhn <bkuhn@sfconservancy.org>
parents: 4043
diff changeset
676 controller='compare', action='index',
ffd45b185016 Imported some of the GPLv3'd changes from RhodeCode v2.2.5.
Bradley M. Kuhn <bkuhn@sfconservancy.org>
parents: 4043
diff changeset
677 conditions=dict(function=check_repo))
ffd45b185016 Imported some of the GPLv3'd changes from RhodeCode v2.2.5.
Bradley M. Kuhn <bkuhn@sfconservancy.org>
parents: 4043
diff changeset
678
2363
745dda7817ed Rewrote url routes to make all validations and parsing for compare view + added compare fork button into forked repos
Marcin Kuzminski <marcin@python-works.com>
parents: 2330
diff changeset
679 rmap.connect('compare_url',
2928
0ebdd15de1d8 fix routing regex for compare branches with / and other special chars
Marcin Kuzminski <marcin@python-works.com>
parents: 2833
diff changeset
680 '/{repo_name:.*?}/compare/{org_ref_type}@{org_ref:.*?}...{other_ref_type}@{other_ref:.*?}',
4116
ffd45b185016 Imported some of the GPLv3'd changes from RhodeCode v2.2.5.
Bradley M. Kuhn <bkuhn@sfconservancy.org>
parents: 4043
diff changeset
681 controller='compare', action='compare',
2363
745dda7817ed Rewrote url routes to make all validations and parsing for compare view + added compare fork button into forked repos
Marcin Kuzminski <marcin@python-works.com>
parents: 2330
diff changeset
682 conditions=dict(function=check_repo),
2710
f4ff3b5bfc42 fixed selecting quick compare view for tags/bookmarks in pull-request form
Marcin Kuzminski <marcin@python-works.com>
parents: 2692
diff changeset
683 requirements=dict(
3322
c9b0f1d363c7 compare: swap org and other when they refer to different repos, ie are pull request style
Mads Kiilerich <madski@unity3d.com>
parents: 3321
diff changeset
684 org_ref_type='(branch|book|tag|rev|__other_ref_type__)',
c9b0f1d363c7 compare: swap org and other when they refer to different repos, ie are pull request style
Mads Kiilerich <madski@unity3d.com>
parents: 3321
diff changeset
685 other_ref_type='(branch|book|tag|rev|__org_ref_type__)')
2710
f4ff3b5bfc42 fixed selecting quick compare view for tags/bookmarks in pull-request form
Marcin Kuzminski <marcin@python-works.com>
parents: 2692
diff changeset
686 )
2241
b2a2868d7bec Basic compare-view controller with ref parsing
Marcin Kuzminski <marcin@python-works.com>
parents: 2177
diff changeset
687
2244
77e376fdc4c6 pull requests draft UI
Marcin Kuzminski <marcin@python-works.com>
parents: 2241
diff changeset
688 rmap.connect('pullrequest_home',
2692
1f75b23c3e26 switched repo_name to non greedy match.
Marcin Kuzminski <marcin@python-works.com>
parents: 2631
diff changeset
689 '/{repo_name:.*?}/pull-request/new', controller='pullrequests',
2434
f29469677319 Added basic models for saving open pull requests
Marcin Kuzminski <marcin@python-works.com>
parents: 2430
diff changeset
690 action='index', conditions=dict(function=check_repo,
f29469677319 Added basic models for saving open pull requests
Marcin Kuzminski <marcin@python-works.com>
parents: 2430
diff changeset
691 method=["GET"]))
f29469677319 Added basic models for saving open pull requests
Marcin Kuzminski <marcin@python-works.com>
parents: 2430
diff changeset
692
f29469677319 Added basic models for saving open pull requests
Marcin Kuzminski <marcin@python-works.com>
parents: 2430
diff changeset
693 rmap.connect('pullrequest',
2692
1f75b23c3e26 switched repo_name to non greedy match.
Marcin Kuzminski <marcin@python-works.com>
parents: 2631
diff changeset
694 '/{repo_name:.*?}/pull-request/new', controller='pullrequests',
2434
f29469677319 Added basic models for saving open pull requests
Marcin Kuzminski <marcin@python-works.com>
parents: 2430
diff changeset
695 action='create', conditions=dict(function=check_repo,
f29469677319 Added basic models for saving open pull requests
Marcin Kuzminski <marcin@python-works.com>
parents: 2430
diff changeset
696 method=["POST"]))
f29469677319 Added basic models for saving open pull requests
Marcin Kuzminski <marcin@python-works.com>
parents: 2430
diff changeset
697
f29469677319 Added basic models for saving open pull requests
Marcin Kuzminski <marcin@python-works.com>
parents: 2430
diff changeset
698 rmap.connect('pullrequest_show',
2692
1f75b23c3e26 switched repo_name to non greedy match.
Marcin Kuzminski <marcin@python-works.com>
parents: 2631
diff changeset
699 '/{repo_name:.*?}/pull-request/{pull_request_id}',
2434
f29469677319 Added basic models for saving open pull requests
Marcin Kuzminski <marcin@python-works.com>
parents: 2430
diff changeset
700 controller='pullrequests',
f29469677319 Added basic models for saving open pull requests
Marcin Kuzminski <marcin@python-works.com>
parents: 2430
diff changeset
701 action='show', conditions=dict(function=check_repo,
f29469677319 Added basic models for saving open pull requests
Marcin Kuzminski <marcin@python-works.com>
parents: 2430
diff changeset
702 method=["GET"]))
2614
3f50a5e8fc4d Added editing of pull-request reviewers.
Marcin Kuzminski <marcin@python-works.com>
parents: 2489
diff changeset
703 rmap.connect('pullrequest_update',
2692
1f75b23c3e26 switched repo_name to non greedy match.
Marcin Kuzminski <marcin@python-works.com>
parents: 2631
diff changeset
704 '/{repo_name:.*?}/pull-request/{pull_request_id}',
2614
3f50a5e8fc4d Added editing of pull-request reviewers.
Marcin Kuzminski <marcin@python-works.com>
parents: 2489
diff changeset
705 controller='pullrequests',
3f50a5e8fc4d Added editing of pull-request reviewers.
Marcin Kuzminski <marcin@python-works.com>
parents: 2489
diff changeset
706 action='update', conditions=dict(function=check_repo,
3f50a5e8fc4d Added editing of pull-request reviewers.
Marcin Kuzminski <marcin@python-works.com>
parents: 2489
diff changeset
707 method=["PUT"]))
2746
49a4864b11c1 Authors of pull-requests can now delete them
Marcin Kuzminski <marcin@python-works.com>
parents: 2726
diff changeset
708 rmap.connect('pullrequest_delete',
49a4864b11c1 Authors of pull-requests can now delete them
Marcin Kuzminski <marcin@python-works.com>
parents: 2726
diff changeset
709 '/{repo_name:.*?}/pull-request/{pull_request_id}',
49a4864b11c1 Authors of pull-requests can now delete them
Marcin Kuzminski <marcin@python-works.com>
parents: 2726
diff changeset
710 controller='pullrequests',
49a4864b11c1 Authors of pull-requests can now delete them
Marcin Kuzminski <marcin@python-works.com>
parents: 2726
diff changeset
711 action='delete', conditions=dict(function=check_repo,
49a4864b11c1 Authors of pull-requests can now delete them
Marcin Kuzminski <marcin@python-works.com>
parents: 2726
diff changeset
712 method=["DELETE"]))
2244
77e376fdc4c6 pull requests draft UI
Marcin Kuzminski <marcin@python-works.com>
parents: 2241
diff changeset
713
2440
1bc579bcd67a - pull request generates overview based on it's params
Marcin Kuzminski <marcin@python-works.com>
parents: 2434
diff changeset
714 rmap.connect('pullrequest_show_all',
2692
1f75b23c3e26 switched repo_name to non greedy match.
Marcin Kuzminski <marcin@python-works.com>
parents: 2631
diff changeset
715 '/{repo_name:.*?}/pull-request',
2440
1bc579bcd67a - pull request generates overview based on it's params
Marcin Kuzminski <marcin@python-works.com>
parents: 2434
diff changeset
716 controller='pullrequests',
1bc579bcd67a - pull request generates overview based on it's params
Marcin Kuzminski <marcin@python-works.com>
parents: 2434
diff changeset
717 action='show_all', conditions=dict(function=check_repo,
1bc579bcd67a - pull request generates overview based on it's params
Marcin Kuzminski <marcin@python-works.com>
parents: 2434
diff changeset
718 method=["GET"]))
1bc579bcd67a - pull request generates overview based on it's params
Marcin Kuzminski <marcin@python-works.com>
parents: 2434
diff changeset
719
2443
fd0a822481ec - added commenting to pull requests
Marcin Kuzminski <marcin@python-works.com>
parents: 2440
diff changeset
720 rmap.connect('pullrequest_comment',
2692
1f75b23c3e26 switched repo_name to non greedy match.
Marcin Kuzminski <marcin@python-works.com>
parents: 2631
diff changeset
721 '/{repo_name:.*?}/pull-request-comment/{pull_request_id}',
2443
fd0a822481ec - added commenting to pull requests
Marcin Kuzminski <marcin@python-works.com>
parents: 2440
diff changeset
722 controller='pullrequests',
fd0a822481ec - added commenting to pull requests
Marcin Kuzminski <marcin@python-works.com>
parents: 2440
diff changeset
723 action='comment', conditions=dict(function=check_repo,
fd0a822481ec - added commenting to pull requests
Marcin Kuzminski <marcin@python-works.com>
parents: 2440
diff changeset
724 method=["POST"]))
fd0a822481ec - added commenting to pull requests
Marcin Kuzminski <marcin@python-works.com>
parents: 2440
diff changeset
725
2489
a0adf8db1416 Enabled inline comments in pull-requests
Marcin Kuzminski <marcin@python-works.com>
parents: 2443
diff changeset
726 rmap.connect('pullrequest_comment_delete',
2692
1f75b23c3e26 switched repo_name to non greedy match.
Marcin Kuzminski <marcin@python-works.com>
parents: 2631
diff changeset
727 '/{repo_name:.*?}/pull-request-comment/{comment_id}/delete',
2489
a0adf8db1416 Enabled inline comments in pull-requests
Marcin Kuzminski <marcin@python-works.com>
parents: 2443
diff changeset
728 controller='pullrequests', action='delete_comment',
a0adf8db1416 Enabled inline comments in pull-requests
Marcin Kuzminski <marcin@python-works.com>
parents: 2443
diff changeset
729 conditions=dict(function=check_repo, method=["DELETE"]))
a0adf8db1416 Enabled inline comments in pull-requests
Marcin Kuzminski <marcin@python-works.com>
parents: 2443
diff changeset
730
3283
a34b98423de7 summary: don't link explicitly to /summary
Mads Kiilerich <madski@unity3d.com>
parents: 3246
diff changeset
731 rmap.connect('summary_home_summary', '/{repo_name:.*?}/summary',
300
8f7b8e965fe4 fixed 404s added extra validator for magic repo_name path in routes
Marcin Kuzminski <marcin@python-works.com>
parents: 299
diff changeset
732 controller='summary', conditions=dict(function=check_repo))
1211
a7e7c0fab9db pep8ify
Marcin Kuzminski <marcin@python-works.com>
parents: 1205
diff changeset
733
2692
1f75b23c3e26 switched repo_name to non greedy match.
Marcin Kuzminski <marcin@python-works.com>
parents: 2631
diff changeset
734 rmap.connect('branches_home', '/{repo_name:.*?}/branches',
300
8f7b8e965fe4 fixed 404s added extra validator for magic repo_name path in routes
Marcin Kuzminski <marcin@python-works.com>
parents: 299
diff changeset
735 controller='branches', conditions=dict(function=check_repo))
1211
a7e7c0fab9db pep8ify
Marcin Kuzminski <marcin@python-works.com>
parents: 1205
diff changeset
736
2692
1f75b23c3e26 switched repo_name to non greedy match.
Marcin Kuzminski <marcin@python-works.com>
parents: 2631
diff changeset
737 rmap.connect('tags_home', '/{repo_name:.*?}/tags',
300
8f7b8e965fe4 fixed 404s added extra validator for magic repo_name path in routes
Marcin Kuzminski <marcin@python-works.com>
parents: 299
diff changeset
738 controller='tags', conditions=dict(function=check_repo))
1211
a7e7c0fab9db pep8ify
Marcin Kuzminski <marcin@python-works.com>
parents: 1205
diff changeset
739
2692
1f75b23c3e26 switched repo_name to non greedy match.
Marcin Kuzminski <marcin@python-works.com>
parents: 2631
diff changeset
740 rmap.connect('bookmarks_home', '/{repo_name:.*?}/bookmarks',
1748
a3ee2611e6e8 implements #135 bookmark support for UI
Marcin Kuzminski <marcin@python-works.com>
parents: 1722
diff changeset
741 controller='bookmarks', conditions=dict(function=check_repo))
a3ee2611e6e8 implements #135 bookmark support for UI
Marcin Kuzminski <marcin@python-works.com>
parents: 1722
diff changeset
742
2692
1f75b23c3e26 switched repo_name to non greedy match.
Marcin Kuzminski <marcin@python-works.com>
parents: 2631
diff changeset
743 rmap.connect('changelog_home', '/{repo_name:.*?}/changelog',
604
5cc96df705b9 fixed @repo into :repo for docs
Marcin Kuzminski <marcin@python-works.com>
parents: 547
diff changeset
744 controller='changelog', conditions=dict(function=check_repo))
1211
a7e7c0fab9db pep8ify
Marcin Kuzminski <marcin@python-works.com>
parents: 1205
diff changeset
745
3764
c7970889c5c0 Removed shortlog aka lightweight changelog.
Marcin Kuzminski <marcin@python-works.com>
parents: 3760
diff changeset
746 rmap.connect('changelog_summary_home', '/{repo_name:.*?}/changelog_summary',
c7970889c5c0 Removed shortlog aka lightweight changelog.
Marcin Kuzminski <marcin@python-works.com>
parents: 3760
diff changeset
747 controller='changelog', action='changelog_summary',
c7970889c5c0 Removed shortlog aka lightweight changelog.
Marcin Kuzminski <marcin@python-works.com>
parents: 3760
diff changeset
748 conditions=dict(function=check_repo))
c7970889c5c0 Removed shortlog aka lightweight changelog.
Marcin Kuzminski <marcin@python-works.com>
parents: 3760
diff changeset
749
3760
6302a1423a4e Use changelog controller for displaying history of files.
Marcin Kuzminski <marcin@python-works.com>
parents: 3734
diff changeset
750 rmap.connect('changelog_file_home', '/{repo_name:.*?}/changelog/{revision}/{f_path:.*}',
6302a1423a4e Use changelog controller for displaying history of files.
Marcin Kuzminski <marcin@python-works.com>
parents: 3734
diff changeset
751 controller='changelog', f_path=None,
6302a1423a4e Use changelog controller for displaying history of files.
Marcin Kuzminski <marcin@python-works.com>
parents: 3734
diff changeset
752 conditions=dict(function=check_repo))
6302a1423a4e Use changelog controller for displaying history of files.
Marcin Kuzminski <marcin@python-works.com>
parents: 3734
diff changeset
753
2692
1f75b23c3e26 switched repo_name to non greedy match.
Marcin Kuzminski <marcin@python-works.com>
parents: 2631
diff changeset
754 rmap.connect('changelog_details', '/{repo_name:.*?}/changelog_details/{cs}',
1431
d5d7c40e8591 changelog uses lazy loading of affected files details, in some scenarios this can improve speed
Marcin Kuzminski <marcin@python-works.com>
parents: 1417
diff changeset
755 controller='changelog', action='changelog_details',
d5d7c40e8591 changelog uses lazy loading of affected files details, in some scenarios this can improve speed
Marcin Kuzminski <marcin@python-works.com>
parents: 1417
diff changeset
756 conditions=dict(function=check_repo))
d5d7c40e8591 changelog uses lazy loading of affected files details, in some scenarios this can improve speed
Marcin Kuzminski <marcin@python-works.com>
parents: 1417
diff changeset
757
2692
1f75b23c3e26 switched repo_name to non greedy match.
Marcin Kuzminski <marcin@python-works.com>
parents: 2631
diff changeset
758 rmap.connect('files_home', '/{repo_name:.*?}/files/{revision}/{f_path:.*}',
300
8f7b8e965fe4 fixed 404s added extra validator for magic repo_name path in routes
Marcin Kuzminski <marcin@python-works.com>
parents: 299
diff changeset
759 controller='files', revision='tip', f_path='',
8f7b8e965fe4 fixed 404s added extra validator for magic repo_name path in routes
Marcin Kuzminski <marcin@python-works.com>
parents: 299
diff changeset
760 conditions=dict(function=check_repo))
1211
a7e7c0fab9db pep8ify
Marcin Kuzminski <marcin@python-works.com>
parents: 1205
diff changeset
761
3576
c177f304eb40 files: accept URLs with no path and no slash after the revision
Mads Kiilerich <madski@unity3d.com>
parents: 3458
diff changeset
762 rmap.connect('files_home_nopath', '/{repo_name:.*?}/files/{revision}',
c177f304eb40 files: accept URLs with no path and no slash after the revision
Mads Kiilerich <madski@unity3d.com>
parents: 3458
diff changeset
763 controller='files', revision='tip', f_path='',
c177f304eb40 files: accept URLs with no path and no slash after the revision
Mads Kiilerich <madski@unity3d.com>
parents: 3458
diff changeset
764 conditions=dict(function=check_repo))
c177f304eb40 files: accept URLs with no path and no slash after the revision
Mads Kiilerich <madski@unity3d.com>
parents: 3458
diff changeset
765
3001
37c7abd34d44 implements #636, lazy loading of history and authors to speed up page responsiveness.
Marcin Kuzminski <marcin@python-works.com>
parents: 2996
diff changeset
766 rmap.connect('files_history_home',
37c7abd34d44 implements #636, lazy loading of history and authors to speed up page responsiveness.
Marcin Kuzminski <marcin@python-works.com>
parents: 2996
diff changeset
767 '/{repo_name:.*?}/history/{revision}/{f_path:.*}',
37c7abd34d44 implements #636, lazy loading of history and authors to speed up page responsiveness.
Marcin Kuzminski <marcin@python-works.com>
parents: 2996
diff changeset
768 controller='files', action='history', revision='tip', f_path='',
37c7abd34d44 implements #636, lazy loading of history and authors to speed up page responsiveness.
Marcin Kuzminski <marcin@python-works.com>
parents: 2996
diff changeset
769 conditions=dict(function=check_repo))
37c7abd34d44 implements #636, lazy loading of history and authors to speed up page responsiveness.
Marcin Kuzminski <marcin@python-works.com>
parents: 2996
diff changeset
770
4116
ffd45b185016 Imported some of the GPLv3'd changes from RhodeCode v2.2.5.
Bradley M. Kuhn <bkuhn@sfconservancy.org>
parents: 4043
diff changeset
771 rmap.connect('files_authors_home',
ffd45b185016 Imported some of the GPLv3'd changes from RhodeCode v2.2.5.
Bradley M. Kuhn <bkuhn@sfconservancy.org>
parents: 4043
diff changeset
772 '/{repo_name:.*?}/authors/{revision}/{f_path:.*}',
ffd45b185016 Imported some of the GPLv3'd changes from RhodeCode v2.2.5.
Bradley M. Kuhn <bkuhn@sfconservancy.org>
parents: 4043
diff changeset
773 controller='files', action='authors', revision='tip', f_path='',
ffd45b185016 Imported some of the GPLv3'd changes from RhodeCode v2.2.5.
Bradley M. Kuhn <bkuhn@sfconservancy.org>
parents: 4043
diff changeset
774 conditions=dict(function=check_repo))
ffd45b185016 Imported some of the GPLv3'd changes from RhodeCode v2.2.5.
Bradley M. Kuhn <bkuhn@sfconservancy.org>
parents: 4043
diff changeset
775
2692
1f75b23c3e26 switched repo_name to non greedy match.
Marcin Kuzminski <marcin@python-works.com>
parents: 2631
diff changeset
776 rmap.connect('files_diff_home', '/{repo_name:.*?}/diff/{f_path:.*}',
300
8f7b8e965fe4 fixed 404s added extra validator for magic repo_name path in routes
Marcin Kuzminski <marcin@python-works.com>
parents: 299
diff changeset
777 controller='files', action='diff', revision='tip', f_path='',
8f7b8e965fe4 fixed 404s added extra validator for magic repo_name path in routes
Marcin Kuzminski <marcin@python-works.com>
parents: 299
diff changeset
778 conditions=dict(function=check_repo))
1211
a7e7c0fab9db pep8ify
Marcin Kuzminski <marcin@python-works.com>
parents: 1205
diff changeset
779
4043
a1bc4af25ec5 Implemented issue #387 side-by-side diffs view
Marcin Kuzminski <marcin@python-works.com>
parents: 4006
diff changeset
780 rmap.connect('files_diff_2way_home', '/{repo_name:.*?}/diff-2way/{f_path:.*}',
a1bc4af25ec5 Implemented issue #387 side-by-side diffs view
Marcin Kuzminski <marcin@python-works.com>
parents: 4006
diff changeset
781 controller='files', action='diff_2way', revision='tip', f_path='',
a1bc4af25ec5 Implemented issue #387 side-by-side diffs view
Marcin Kuzminski <marcin@python-works.com>
parents: 4006
diff changeset
782 conditions=dict(function=check_repo))
a1bc4af25ec5 Implemented issue #387 side-by-side diffs view
Marcin Kuzminski <marcin@python-works.com>
parents: 4006
diff changeset
783
1211
a7e7c0fab9db pep8ify
Marcin Kuzminski <marcin@python-works.com>
parents: 1205
diff changeset
784 rmap.connect('files_rawfile_home',
2692
1f75b23c3e26 switched repo_name to non greedy match.
Marcin Kuzminski <marcin@python-works.com>
parents: 2631
diff changeset
785 '/{repo_name:.*?}/rawfile/{revision}/{f_path:.*}',
1211
a7e7c0fab9db pep8ify
Marcin Kuzminski <marcin@python-works.com>
parents: 1205
diff changeset
786 controller='files', action='rawfile', revision='tip',
a7e7c0fab9db pep8ify
Marcin Kuzminski <marcin@python-works.com>
parents: 1205
diff changeset
787 f_path='', conditions=dict(function=check_repo))
a7e7c0fab9db pep8ify
Marcin Kuzminski <marcin@python-works.com>
parents: 1205
diff changeset
788
a7e7c0fab9db pep8ify
Marcin Kuzminski <marcin@python-works.com>
parents: 1205
diff changeset
789 rmap.connect('files_raw_home',
2692
1f75b23c3e26 switched repo_name to non greedy match.
Marcin Kuzminski <marcin@python-works.com>
parents: 2631
diff changeset
790 '/{repo_name:.*?}/raw/{revision}/{f_path:.*}',
1211
a7e7c0fab9db pep8ify
Marcin Kuzminski <marcin@python-works.com>
parents: 1205
diff changeset
791 controller='files', action='raw', revision='tip', f_path='',
a7e7c0fab9db pep8ify
Marcin Kuzminski <marcin@python-works.com>
parents: 1205
diff changeset
792 conditions=dict(function=check_repo))
a7e7c0fab9db pep8ify
Marcin Kuzminski <marcin@python-works.com>
parents: 1205
diff changeset
793
a7e7c0fab9db pep8ify
Marcin Kuzminski <marcin@python-works.com>
parents: 1205
diff changeset
794 rmap.connect('files_annotate_home',
2692
1f75b23c3e26 switched repo_name to non greedy match.
Marcin Kuzminski <marcin@python-works.com>
parents: 2631
diff changeset
795 '/{repo_name:.*?}/annotate/{revision}/{f_path:.*}',
2177
ee07357d9265 unified annotation view with file source view
Marcin Kuzminski <marcin@python-works.com>
parents: 1982
diff changeset
796 controller='files', action='index', revision='tip',
ee07357d9265 unified annotation view with file source view
Marcin Kuzminski <marcin@python-works.com>
parents: 1982
diff changeset
797 f_path='', annotate=True, conditions=dict(function=check_repo))
1211
a7e7c0fab9db pep8ify
Marcin Kuzminski <marcin@python-works.com>
parents: 1205
diff changeset
798
1305
166317d464f3 Added server side file editing with commit
Marcin Kuzminski <marcin@python-works.com>
parents: 1301
diff changeset
799 rmap.connect('files_edit_home',
2692
1f75b23c3e26 switched repo_name to non greedy match.
Marcin Kuzminski <marcin@python-works.com>
parents: 2631
diff changeset
800 '/{repo_name:.*?}/edit/{revision}/{f_path:.*}',
1305
166317d464f3 Added server side file editing with commit
Marcin Kuzminski <marcin@python-works.com>
parents: 1301
diff changeset
801 controller='files', action='edit', revision='tip',
166317d464f3 Added server side file editing with commit
Marcin Kuzminski <marcin@python-works.com>
parents: 1301
diff changeset
802 f_path='', conditions=dict(function=check_repo))
166317d464f3 Added server side file editing with commit
Marcin Kuzminski <marcin@python-works.com>
parents: 1301
diff changeset
803
1483
7b67b0dcad6d Added initial support for creating new nodes in repos
Marcin Kuzminski <marcin@python-works.com>
parents: 1452
diff changeset
804 rmap.connect('files_add_home',
2692
1f75b23c3e26 switched repo_name to non greedy match.
Marcin Kuzminski <marcin@python-works.com>
parents: 2631
diff changeset
805 '/{repo_name:.*?}/add/{revision}/{f_path:.*}',
1483
7b67b0dcad6d Added initial support for creating new nodes in repos
Marcin Kuzminski <marcin@python-works.com>
parents: 1452
diff changeset
806 controller='files', action='add', revision='tip',
7b67b0dcad6d Added initial support for creating new nodes in repos
Marcin Kuzminski <marcin@python-works.com>
parents: 1452
diff changeset
807 f_path='', conditions=dict(function=check_repo))
7b67b0dcad6d Added initial support for creating new nodes in repos
Marcin Kuzminski <marcin@python-works.com>
parents: 1452
diff changeset
808
4116
ffd45b185016 Imported some of the GPLv3'd changes from RhodeCode v2.2.5.
Bradley M. Kuhn <bkuhn@sfconservancy.org>
parents: 4043
diff changeset
809 rmap.connect('files_delete_home',
ffd45b185016 Imported some of the GPLv3'd changes from RhodeCode v2.2.5.
Bradley M. Kuhn <bkuhn@sfconservancy.org>
parents: 4043
diff changeset
810 '/{repo_name:.*?}/delete/{revision}/{f_path:.*}',
ffd45b185016 Imported some of the GPLv3'd changes from RhodeCode v2.2.5.
Bradley M. Kuhn <bkuhn@sfconservancy.org>
parents: 4043
diff changeset
811 controller='files', action='delete', revision='tip',
ffd45b185016 Imported some of the GPLv3'd changes from RhodeCode v2.2.5.
Bradley M. Kuhn <bkuhn@sfconservancy.org>
parents: 4043
diff changeset
812 f_path='', conditions=dict(function=check_repo))
ffd45b185016 Imported some of the GPLv3'd changes from RhodeCode v2.2.5.
Bradley M. Kuhn <bkuhn@sfconservancy.org>
parents: 4043
diff changeset
813
2692
1f75b23c3e26 switched repo_name to non greedy match.
Marcin Kuzminski <marcin@python-works.com>
parents: 2631
diff changeset
814 rmap.connect('files_archive_home', '/{repo_name:.*?}/archive/{fname}',
872
b956e6f415a2 implemented #91,
Marcin Kuzminski <marcin@python-works.com>
parents: 769
diff changeset
815 controller='files', action='archivefile',
604
5cc96df705b9 fixed @repo into :repo for docs
Marcin Kuzminski <marcin@python-works.com>
parents: 547
diff changeset
816 conditions=dict(function=check_repo))
1211
a7e7c0fab9db pep8ify
Marcin Kuzminski <marcin@python-works.com>
parents: 1205
diff changeset
817
1452
8585fbf3ed06 Implemented #111 copy github node finder solution
Marcin Kuzminski <marcin@python-works.com>
parents: 1445
diff changeset
818 rmap.connect('files_nodelist_home',
2692
1f75b23c3e26 switched repo_name to non greedy match.
Marcin Kuzminski <marcin@python-works.com>
parents: 2631
diff changeset
819 '/{repo_name:.*?}/nodelist/{revision}/{f_path:.*}',
1452
8585fbf3ed06 Implemented #111 copy github node finder solution
Marcin Kuzminski <marcin@python-works.com>
parents: 1445
diff changeset
820 controller='files', action='nodelist',
8585fbf3ed06 Implemented #111 copy github node finder solution
Marcin Kuzminski <marcin@python-works.com>
parents: 1445
diff changeset
821 conditions=dict(function=check_repo))
8585fbf3ed06 Implemented #111 copy github node finder solution
Marcin Kuzminski <marcin@python-works.com>
parents: 1445
diff changeset
822
2692
1f75b23c3e26 switched repo_name to non greedy match.
Marcin Kuzminski <marcin@python-works.com>
parents: 2631
diff changeset
823 rmap.connect('repo_fork_create_home', '/{repo_name:.*?}/fork',
1722
e7eef7a1db6a #235 forking page repo group selection
Marcin Kuzminski <marcin@python-works.com>
parents: 1712
diff changeset
824 controller='forks', action='fork_create',
530
a08f610e545e Implemented server side forks
Marcin Kuzminski <marcin@python-works.com>
parents: 525
diff changeset
825 conditions=dict(function=check_repo, method=["POST"]))
1211
a7e7c0fab9db pep8ify
Marcin Kuzminski <marcin@python-works.com>
parents: 1205
diff changeset
826
2692
1f75b23c3e26 switched repo_name to non greedy match.
Marcin Kuzminski <marcin@python-works.com>
parents: 2631
diff changeset
827 rmap.connect('repo_fork_home', '/{repo_name:.*?}/fork',
1722
e7eef7a1db6a #235 forking page repo group selection
Marcin Kuzminski <marcin@python-works.com>
parents: 1712
diff changeset
828 controller='forks', action='fork',
530
a08f610e545e Implemented server side forks
Marcin Kuzminski <marcin@python-works.com>
parents: 525
diff changeset
829 conditions=dict(function=check_repo))
604
5cc96df705b9 fixed @repo into :repo for docs
Marcin Kuzminski <marcin@python-works.com>
parents: 547
diff changeset
830
2692
1f75b23c3e26 switched repo_name to non greedy match.
Marcin Kuzminski <marcin@python-works.com>
parents: 2631
diff changeset
831 rmap.connect('repo_forks_home', '/{repo_name:.*?}/forks',
1722
e7eef7a1db6a #235 forking page repo group selection
Marcin Kuzminski <marcin@python-works.com>
parents: 1712
diff changeset
832 controller='forks', action='forks',
e7eef7a1db6a #235 forking page repo group selection
Marcin Kuzminski <marcin@python-works.com>
parents: 1712
diff changeset
833 conditions=dict(function=check_repo))
e7eef7a1db6a #235 forking page repo group selection
Marcin Kuzminski <marcin@python-works.com>
parents: 1712
diff changeset
834
2692
1f75b23c3e26 switched repo_name to non greedy match.
Marcin Kuzminski <marcin@python-works.com>
parents: 2631
diff changeset
835 rmap.connect('repo_followers_home', '/{repo_name:.*?}/followers',
1279
cb216757a62d #179 Added followers page
Marcin Kuzminski <marcin@python-works.com>
parents: 1271
diff changeset
836 controller='followers', action='followers',
cb216757a62d #179 Added followers page
Marcin Kuzminski <marcin@python-works.com>
parents: 1271
diff changeset
837 conditions=dict(function=check_repo))
1301
7e75af301842 Added simple forks page, resolves issue #179
Marcin Kuzminski <marcin@python-works.com>
parents: 1279
diff changeset
838
1211
a7e7c0fab9db pep8ify
Marcin Kuzminski <marcin@python-works.com>
parents: 1205
diff changeset
839 return rmap