Mercurial > kallithea
annotate rhodecode/config/routing.py @ 3866:1fdec7e3aeb2 beta
refactored url.resource to full definition of routes
- id -> gist_id
author | Marcin Kuzminski <marcin@python-works.com> |
---|---|
date | Sat, 18 May 2013 23:41:37 +0200 |
parents | dc4644865e8b |
children | 73f7149f2cc0 |
rev | line source |
---|---|
604
5cc96df705b9
fixed @repo into :repo for docs
Marcin Kuzminski <marcin@python-works.com>
parents:
547
diff
changeset
|
1 """ |
5cc96df705b9
fixed @repo into :repo for docs
Marcin Kuzminski <marcin@python-works.com>
parents:
547
diff
changeset
|
2 Routes configuration |
0 | 3 |
4 The more specific and detailed routes should be defined first so they | |
5 may take precedent over the more generic routes. For more information | |
6 refer to the routes manual at http://routes.groovie.org/docs/ | |
7 """ | |
371
5cd6616b8673
routes python 2.5 compatible
Marcin Kuzminski <marcin@python-works.com>
parents:
363
diff
changeset
|
8 from __future__ import with_statement |
0 | 9 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
|
10 |
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
|
11 # 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
|
12 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
|
13 |
1205
f4807acf643d
added __license__ into main of rhodecode, PEP8ify
Marcin Kuzminski <marcin@python-works.com>
parents:
1203
diff
changeset
|
14 |
43 | 15 def make_map(config): |
0 | 16 """Create, configure and return the routes Mapper""" |
1211 | 17 rmap = Mapper(directory=config['pylons.paths']['controllers'], |
43 | 18 always_scan=config['debug']) |
1211 | 19 rmap.minimization = False |
20 rmap.explicit = False | |
1538
27be8f94c207
implements #226 repo groups available by path
Marcin Kuzminski <marcin@python-works.com>
parents:
1507
diff
changeset
|
21 |
1507
7d687ed11929
changed check_... functions from their stupid names to something less retarded :)
Marcin Kuzminski <marcin@python-works.com>
parents:
1505
diff
changeset
|
22 from rhodecode.lib.utils import is_valid_repo |
7d687ed11929
changed check_... functions from their stupid names to something less retarded :)
Marcin Kuzminski <marcin@python-works.com>
parents:
1505
diff
changeset
|
23 from rhodecode.lib.utils import is_valid_repos_group |
1538
27be8f94c207
implements #226 repo groups available by path
Marcin Kuzminski <marcin@python-works.com>
parents:
1507
diff
changeset
|
24 |
604
5cc96df705b9
fixed @repo into :repo for docs
Marcin Kuzminski <marcin@python-works.com>
parents:
547
diff
changeset
|
25 def check_repo(environ, match_dict): |
5cc96df705b9
fixed @repo into :repo for docs
Marcin Kuzminski <marcin@python-works.com>
parents:
547
diff
changeset
|
26 """ |
5cc96df705b9
fixed @repo into :repo for docs
Marcin Kuzminski <marcin@python-works.com>
parents:
547
diff
changeset
|
27 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
|
28 |
604
5cc96df705b9
fixed @repo into :repo for docs
Marcin Kuzminski <marcin@python-works.com>
parents:
547
diff
changeset
|
29 :param environ: |
5cc96df705b9
fixed @repo into :repo for docs
Marcin Kuzminski <marcin@python-works.com>
parents:
547
diff
changeset
|
30 :param match_dict: |
5cc96df705b9
fixed @repo into :repo for docs
Marcin Kuzminski <marcin@python-works.com>
parents:
547
diff
changeset
|
31 """ |
1813
a8c66e870bd0
implements #285: Implemented non changeable urls for clone url, and web views
Marcin Kuzminski <marcin@python-works.com>
parents:
1791
diff
changeset
|
32 from rhodecode.model.db import Repository |
a8c66e870bd0
implements #285: Implemented non changeable urls for clone url, and web views
Marcin Kuzminski <marcin@python-works.com>
parents:
1791
diff
changeset
|
33 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
|
34 |
3040
ec483ce69ad9
added global fix for stripping multiple slashes from f_path variable
Marcin Kuzminski <marcin@python-works.com>
parents:
3039
diff
changeset
|
35 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
|
36 #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
|
37 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
|
38 |
1813
a8c66e870bd0
implements #285: Implemented non changeable urls for clone url, and web views
Marcin Kuzminski <marcin@python-works.com>
parents:
1791
diff
changeset
|
39 try: |
a8c66e870bd0
implements #285: Implemented non changeable urls for clone url, and web views
Marcin Kuzminski <marcin@python-works.com>
parents:
1791
diff
changeset
|
40 by_id = repo_name.split('_') |
2822
1670ee0aded7
fixed issue #559 fixed bug in routing that mapped repo names with <name>_<num> in name as
Marcin Kuzminski <marcin@python-works.com>
parents:
2757
diff
changeset
|
41 if len(by_id) == 2 and by_id[1].isdigit() and by_id[0] == '': |
1813
a8c66e870bd0
implements #285: Implemented non changeable urls for clone url, and web views
Marcin Kuzminski <marcin@python-works.com>
parents:
1791
diff
changeset
|
42 repo_name = Repository.get(by_id[1]).repo_name |
a8c66e870bd0
implements #285: Implemented non changeable urls for clone url, and web views
Marcin Kuzminski <marcin@python-works.com>
parents:
1791
diff
changeset
|
43 match_dict['repo_name'] = repo_name |
3631
10b4e34841a4
Don't catch all exceptions
Marcin Kuzminski <marcin@python-works.com>
parents:
3629
diff
changeset
|
44 except Exception: |
1813
a8c66e870bd0
implements #285: Implemented non changeable urls for clone url, and web views
Marcin Kuzminski <marcin@python-works.com>
parents:
1791
diff
changeset
|
45 pass |
a8c66e870bd0
implements #285: Implemented non changeable urls for clone url, and web views
Marcin Kuzminski <marcin@python-works.com>
parents:
1791
diff
changeset
|
46 |
1507
7d687ed11929
changed check_... functions from their stupid names to something less retarded :)
Marcin Kuzminski <marcin@python-works.com>
parents:
1505
diff
changeset
|
47 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
|
48 |
bb6ba7442293
Fixed methods for checking if path in routes is a repo
Marcin Kuzminski <marcin@python-works.com>
parents:
1483
diff
changeset
|
49 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
|
50 """ |
3416
5706f6ab60cf
follow-up on texts missing from 'users groups'/'repositories group' cleanup
Mads Kiilerich <madski@unity3d.com>
parents:
3410
diff
changeset
|
51 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
|
52 |
1505
bb6ba7442293
Fixed methods for checking if path in routes is a repo
Marcin Kuzminski <marcin@python-works.com>
parents:
1483
diff
changeset
|
53 :param environ: |
bb6ba7442293
Fixed methods for checking if path in routes is a repo
Marcin Kuzminski <marcin@python-works.com>
parents:
1483
diff
changeset
|
54 :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
|
55 """ |
bb6ba7442293
Fixed methods for checking if path in routes is a repo
Marcin Kuzminski <marcin@python-works.com>
parents:
1483
diff
changeset
|
56 repos_group_name = match_dict.get('group_name') |
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_repos_group(repos_group_name, config['base_path']) |
604
5cc96df705b9
fixed @repo into :repo for docs
Marcin Kuzminski <marcin@python-works.com>
parents:
547
diff
changeset
|
58 |
3458
0ad025ee005e
better detection of deleting groups with subgroups inside.
Marcin Kuzminski <marcin@python-works.com>
parents:
3416
diff
changeset
|
59 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
|
60 """ |
0ad025ee005e
better detection of deleting groups with subgroups inside.
Marcin Kuzminski <marcin@python-works.com>
parents:
3416
diff
changeset
|
61 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
|
62 verification of existing path |
0ad025ee005e
better detection of deleting groups with subgroups inside.
Marcin Kuzminski <marcin@python-works.com>
parents:
3416
diff
changeset
|
63 |
0ad025ee005e
better detection of deleting groups with subgroups inside.
Marcin Kuzminski <marcin@python-works.com>
parents:
3416
diff
changeset
|
64 :param environ: |
0ad025ee005e
better detection of deleting groups with subgroups inside.
Marcin Kuzminski <marcin@python-works.com>
parents:
3416
diff
changeset
|
65 :param match_dict: |
0ad025ee005e
better detection of deleting groups with subgroups inside.
Marcin Kuzminski <marcin@python-works.com>
parents:
3416
diff
changeset
|
66 """ |
0ad025ee005e
better detection of deleting groups with subgroups inside.
Marcin Kuzminski <marcin@python-works.com>
parents:
3416
diff
changeset
|
67 repos_group_name = match_dict.get('group_name') |
0ad025ee005e
better detection of deleting groups with subgroups inside.
Marcin Kuzminski <marcin@python-works.com>
parents:
3416
diff
changeset
|
68 return is_valid_repos_group(repos_group_name, config['base_path'], |
0ad025ee005e
better detection of deleting groups with subgroups inside.
Marcin Kuzminski <marcin@python-works.com>
parents:
3416
diff
changeset
|
69 skip_path_check=True) |
0ad025ee005e
better detection of deleting groups with subgroups inside.
Marcin Kuzminski <marcin@python-works.com>
parents:
3416
diff
changeset
|
70 |
3734
a8f520540ab0
New default permissions definition for user group create
Marcin Kuzminski <marcin@python-works.com>
parents:
3715
diff
changeset
|
71 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
|
72 """ |
a8f520540ab0
New default permissions definition for user group create
Marcin Kuzminski <marcin@python-works.com>
parents:
3715
diff
changeset
|
73 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
|
74 |
a8f520540ab0
New default permissions definition for user group create
Marcin Kuzminski <marcin@python-works.com>
parents:
3715
diff
changeset
|
75 :param environ: |
a8f520540ab0
New default permissions definition for user group create
Marcin Kuzminski <marcin@python-works.com>
parents:
3715
diff
changeset
|
76 :param match_dict: |
a8f520540ab0
New default permissions definition for user group create
Marcin Kuzminski <marcin@python-works.com>
parents:
3715
diff
changeset
|
77 """ |
a8f520540ab0
New default permissions definition for user group create
Marcin Kuzminski <marcin@python-works.com>
parents:
3715
diff
changeset
|
78 return True |
a8f520540ab0
New default permissions definition for user group create
Marcin Kuzminski <marcin@python-works.com>
parents:
3715
diff
changeset
|
79 |
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
|
80 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
|
81 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
|
82 |
0 | 83 # The ErrorController route (handles 404/500 error pages); it should |
84 # likely stay at the top, ensuring it can always be resolved | |
1211 | 85 rmap.connect('/error/{action}', controller='error') |
86 rmap.connect('/error/{action}/{id}', controller='error') | |
0 | 87 |
604
5cc96df705b9
fixed @repo into :repo for docs
Marcin Kuzminski <marcin@python-works.com>
parents:
547
diff
changeset
|
88 #========================================================================== |
0 | 89 # CUSTOM ROUTES HERE |
604
5cc96df705b9
fixed @repo into :repo for docs
Marcin Kuzminski <marcin@python-works.com>
parents:
547
diff
changeset
|
90 #========================================================================== |
5cc96df705b9
fixed @repo into :repo for docs
Marcin Kuzminski <marcin@python-works.com>
parents:
547
diff
changeset
|
91 |
5cc96df705b9
fixed @repo into :repo for docs
Marcin Kuzminski <marcin@python-works.com>
parents:
547
diff
changeset
|
92 #MAIN PAGE |
1211 | 93 rmap.connect('home', '/', controller='home', action='index') |
1214
a2dba9356c64
fixed removed route during pep8ify
Marcin Kuzminski <marcin@python-works.com>
parents:
1211
diff
changeset
|
94 rmap.connect('repo_switcher', '/repos', controller='home', |
a2dba9356c64
fixed removed route during pep8ify
Marcin Kuzminski <marcin@python-works.com>
parents:
1211
diff
changeset
|
95 action='repo_switcher') |
2692
1f75b23c3e26
switched repo_name to non greedy match.
Marcin Kuzminski <marcin@python-works.com>
parents:
2631
diff
changeset
|
96 rmap.connect('branch_tag_switcher', '/branches-tags/{repo_name:.*?}', |
1712
cac5109ac3b6
Notification system improvements
Marcin Kuzminski <marcin@python-works.com>
parents:
1702
diff
changeset
|
97 controller='home', action='branch_tag_switcher') |
1211 | 98 rmap.connect('bugtracker', |
99 "http://bitbucket.org/marcinkuzminski/rhodecode/issues", | |
100 _static=True) | |
1680
cf370b6d3977
added rst help link
Marcin Kuzminski <marcin@python-works.com>
parents:
1674
diff
changeset
|
101 rmap.connect('rst_help', |
cf370b6d3977
added rst help link
Marcin Kuzminski <marcin@python-works.com>
parents:
1674
diff
changeset
|
102 "http://docutils.sourceforge.net/docs/user/rst/quickref.html", |
cf370b6d3977
added rst help link
Marcin Kuzminski <marcin@python-works.com>
parents:
1674
diff
changeset
|
103 _static=True) |
1211 | 104 rmap.connect('rhodecode_official', "http://rhodecode.org", _static=True) |
1143
0e6035a85980
added changes made in production branch back into beta
Marcin Kuzminski <marcin@python-works.com>
parents:
1114
diff
changeset
|
105 |
604
5cc96df705b9
fixed @repo into :repo for docs
Marcin Kuzminski <marcin@python-works.com>
parents:
547
diff
changeset
|
106 #ADMIN REPOSITORY 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
|
107 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
|
108 controller='admin/repos') as m: |
248
fb7f066126cc
Added support for repository located in subdirectories.
Marcin Kuzminski <marcin@python-works.com>
parents:
230
diff
changeset
|
109 m.connect("repos", "/repos", |
fb7f066126cc
Added support for repository located in subdirectories.
Marcin Kuzminski <marcin@python-works.com>
parents:
230
diff
changeset
|
110 action="create", conditions=dict(method=["POST"])) |
fb7f066126cc
Added support for repository located in subdirectories.
Marcin Kuzminski <marcin@python-works.com>
parents:
230
diff
changeset
|
111 m.connect("repos", "/repos", |
fb7f066126cc
Added support for repository located in subdirectories.
Marcin Kuzminski <marcin@python-works.com>
parents:
230
diff
changeset
|
112 action="index", conditions=dict(method=["GET"])) |
fb7f066126cc
Added support for repository located in subdirectories.
Marcin Kuzminski <marcin@python-works.com>
parents:
230
diff
changeset
|
113 m.connect("formatted_repos", "/repos.{format}", |
fb7f066126cc
Added support for repository located in subdirectories.
Marcin Kuzminski <marcin@python-works.com>
parents:
230
diff
changeset
|
114 action="index", |
fb7f066126cc
Added support for repository located in subdirectories.
Marcin Kuzminski <marcin@python-works.com>
parents:
230
diff
changeset
|
115 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
|
116 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
|
117 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
|
118 m.connect("/repos/{repo_name:.*?}", |
300
8f7b8e965fe4
fixed 404s added extra validator for magic repo_name path in routes
Marcin Kuzminski <marcin@python-works.com>
parents:
299
diff
changeset
|
119 action="update", conditions=dict(method=["PUT"], |
8f7b8e965fe4
fixed 404s added extra validator for magic repo_name path in routes
Marcin Kuzminski <marcin@python-works.com>
parents:
299
diff
changeset
|
120 function=check_repo)) |
2692
1f75b23c3e26
switched repo_name to non greedy match.
Marcin Kuzminski <marcin@python-works.com>
parents:
2631
diff
changeset
|
121 m.connect("/repos/{repo_name:.*?}", |
300
8f7b8e965fe4
fixed 404s added extra validator for magic repo_name path in routes
Marcin Kuzminski <marcin@python-works.com>
parents:
299
diff
changeset
|
122 action="delete", conditions=dict(method=["DELETE"], |
8f7b8e965fe4
fixed 404s added extra validator for magic repo_name path in routes
Marcin Kuzminski <marcin@python-works.com>
parents:
299
diff
changeset
|
123 function=check_repo)) |
2692
1f75b23c3e26
switched repo_name to non greedy match.
Marcin Kuzminski <marcin@python-works.com>
parents:
2631
diff
changeset
|
124 m.connect("formatted_edit_repo", "/repos/{repo_name:.*?}.{format}/edit", |
300
8f7b8e965fe4
fixed 404s added extra validator for magic repo_name path in routes
Marcin Kuzminski <marcin@python-works.com>
parents:
299
diff
changeset
|
125 action="edit", conditions=dict(method=["GET"], |
8f7b8e965fe4
fixed 404s added extra validator for magic repo_name path in routes
Marcin Kuzminski <marcin@python-works.com>
parents:
299
diff
changeset
|
126 function=check_repo)) |
2692
1f75b23c3e26
switched repo_name to non greedy match.
Marcin Kuzminski <marcin@python-works.com>
parents:
2631
diff
changeset
|
127 m.connect("repo", "/repos/{repo_name:.*?}", |
300
8f7b8e965fe4
fixed 404s added extra validator for magic repo_name path in routes
Marcin Kuzminski <marcin@python-works.com>
parents:
299
diff
changeset
|
128 action="show", conditions=dict(method=["GET"], |
8f7b8e965fe4
fixed 404s added extra validator for magic repo_name path in routes
Marcin Kuzminski <marcin@python-works.com>
parents:
299
diff
changeset
|
129 function=check_repo)) |
2692
1f75b23c3e26
switched repo_name to non greedy match.
Marcin Kuzminski <marcin@python-works.com>
parents:
2631
diff
changeset
|
130 m.connect("formatted_repo", "/repos/{repo_name:.*?}.{format}", |
300
8f7b8e965fe4
fixed 404s added extra validator for magic repo_name path in routes
Marcin Kuzminski <marcin@python-works.com>
parents:
299
diff
changeset
|
131 action="show", conditions=dict(method=["GET"], |
8f7b8e965fe4
fixed 404s added extra validator for magic repo_name path in routes
Marcin Kuzminski <marcin@python-works.com>
parents:
299
diff
changeset
|
132 function=check_repo)) |
3628
c734686b3cf2
moved permission management into separate entity.
Marcin Kuzminski <marcin@python-works.com>
parents:
3576
diff
changeset
|
133 #add repo perm member |
3715
25dbbdae3ed9
consistent handling of grant/revoke of permissions widgets
Marcin Kuzminski <marcin@python-works.com>
parents:
3714
diff
changeset
|
134 m.connect('set_repo_perm_member', |
25dbbdae3ed9
consistent handling of grant/revoke of permissions widgets
Marcin Kuzminski <marcin@python-works.com>
parents:
3714
diff
changeset
|
135 "/repos/{repo_name:.*?}/grant_perm", |
25dbbdae3ed9
consistent handling of grant/revoke of permissions widgets
Marcin Kuzminski <marcin@python-works.com>
parents:
3714
diff
changeset
|
136 action="set_repo_perm_member", |
25dbbdae3ed9
consistent handling of grant/revoke of permissions widgets
Marcin Kuzminski <marcin@python-works.com>
parents:
3714
diff
changeset
|
137 conditions=dict(method=["POST"], function=check_repo)) |
3628
c734686b3cf2
moved permission management into separate entity.
Marcin Kuzminski <marcin@python-works.com>
parents:
3576
diff
changeset
|
138 |
299
d303aacb3349
repos crud controllers - change id into repo_name for compatability, added ajax repo perm user function variuos html fixes, permissions forms and managment fixes.
Marcin Kuzminski <marcin@python-works.com>
parents:
248
diff
changeset
|
139 #ajax delete repo perm user |
3715
25dbbdae3ed9
consistent handling of grant/revoke of permissions widgets
Marcin Kuzminski <marcin@python-works.com>
parents:
3714
diff
changeset
|
140 m.connect('delete_repo_perm_member', |
25dbbdae3ed9
consistent handling of grant/revoke of permissions widgets
Marcin Kuzminski <marcin@python-works.com>
parents:
3714
diff
changeset
|
141 "/repos/{repo_name:.*?}/revoke_perm", |
25dbbdae3ed9
consistent handling of grant/revoke of permissions widgets
Marcin Kuzminski <marcin@python-works.com>
parents:
3714
diff
changeset
|
142 action="delete_repo_perm_member", |
1211 | 143 conditions=dict(method=["DELETE"], function=check_repo)) |
1015
65129c332d37
#56 added ajax removal of users groups,
Marcin Kuzminski <marcin@python-works.com>
parents:
976
diff
changeset
|
144 |
708
b9bbc0d6e9f3
added cache reset, stats reset, and delete into repository settings in admin.
Marcin Kuzminski <marcin@python-works.com>
parents:
705
diff
changeset
|
145 #settings actions |
2692
1f75b23c3e26
switched repo_name to non greedy match.
Marcin Kuzminski <marcin@python-works.com>
parents:
2631
diff
changeset
|
146 m.connect('repo_stats', "/repos_stats/{repo_name:.*?}", |
1755
1088ded6e602
implements #239 manual marking of repos as forks for admins
Marcin Kuzminski <marcin@python-works.com>
parents:
1748
diff
changeset
|
147 action="repo_stats", conditions=dict(method=["DELETE"], |
1088ded6e602
implements #239 manual marking of repos as forks for admins
Marcin Kuzminski <marcin@python-works.com>
parents:
1748
diff
changeset
|
148 function=check_repo)) |
2692
1f75b23c3e26
switched repo_name to non greedy match.
Marcin Kuzminski <marcin@python-works.com>
parents:
2631
diff
changeset
|
149 m.connect('repo_cache', "/repos_cache/{repo_name:.*?}", |
1755
1088ded6e602
implements #239 manual marking of repos as forks for admins
Marcin Kuzminski <marcin@python-works.com>
parents:
1748
diff
changeset
|
150 action="repo_cache", conditions=dict(method=["DELETE"], |
1088ded6e602
implements #239 manual marking of repos as forks for admins
Marcin Kuzminski <marcin@python-works.com>
parents:
1748
diff
changeset
|
151 function=check_repo)) |
2692
1f75b23c3e26
switched repo_name to non greedy match.
Marcin Kuzminski <marcin@python-works.com>
parents:
2631
diff
changeset
|
152 m.connect('repo_public_journal', "/repos_public_journal/{repo_name:.*?}", |
1755
1088ded6e602
implements #239 manual marking of repos as forks for admins
Marcin Kuzminski <marcin@python-works.com>
parents:
1748
diff
changeset
|
153 action="repo_public_journal", conditions=dict(method=["PUT"], |
708
b9bbc0d6e9f3
added cache reset, stats reset, and delete into repository settings in admin.
Marcin Kuzminski <marcin@python-works.com>
parents:
705
diff
changeset
|
154 function=check_repo)) |
2692
1f75b23c3e26
switched repo_name to non greedy match.
Marcin Kuzminski <marcin@python-works.com>
parents:
2631
diff
changeset
|
155 m.connect('repo_pull', "/repo_pull/{repo_name:.*?}", |
1755
1088ded6e602
implements #239 manual marking of repos as forks for admins
Marcin Kuzminski <marcin@python-works.com>
parents:
1748
diff
changeset
|
156 action="repo_pull", conditions=dict(method=["PUT"], |
1088ded6e602
implements #239 manual marking of repos as forks for admins
Marcin Kuzminski <marcin@python-works.com>
parents:
1748
diff
changeset
|
157 function=check_repo)) |
2692
1f75b23c3e26
switched repo_name to non greedy match.
Marcin Kuzminski <marcin@python-works.com>
parents:
2631
diff
changeset
|
158 m.connect('repo_as_fork', "/repo_as_fork/{repo_name:.*?}", |
1755
1088ded6e602
implements #239 manual marking of repos as forks for admins
Marcin Kuzminski <marcin@python-works.com>
parents:
1748
diff
changeset
|
159 action="repo_as_fork", conditions=dict(method=["PUT"], |
1088ded6e602
implements #239 manual marking of repos as forks for admins
Marcin Kuzminski <marcin@python-works.com>
parents:
1748
diff
changeset
|
160 function=check_repo)) |
2726
aa17c7a1b8a5
Implemented basic locking functionality.
Marcin Kuzminski <marcin@python-works.com>
parents:
2710
diff
changeset
|
161 m.connect('repo_locking', "/repo_locking/{repo_name:.*?}", |
aa17c7a1b8a5
Implemented basic locking functionality.
Marcin Kuzminski <marcin@python-works.com>
parents:
2710
diff
changeset
|
162 action="repo_locking", conditions=dict(method=["PUT"], |
aa17c7a1b8a5
Implemented basic locking functionality.
Marcin Kuzminski <marcin@python-works.com>
parents:
2710
diff
changeset
|
163 function=check_repo)) |
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
|
164 m.connect('toggle_locking', "/locking_toggle/{repo_name:.*?}", |
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
|
165 action="toggle_locking", conditions=dict(method=["GET"], |
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
|
166 function=check_repo)) |
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
|
167 |
3308
72a91632b731
repository extra fields implementation
Marcin Kuzminski <marcin@python-works.com>
parents:
3298
diff
changeset
|
168 #repo fields |
72a91632b731
repository extra fields implementation
Marcin Kuzminski <marcin@python-works.com>
parents:
3298
diff
changeset
|
169 m.connect('create_repo_fields', "/repo_fields/{repo_name:.*?}/new", |
72a91632b731
repository extra fields implementation
Marcin Kuzminski <marcin@python-works.com>
parents:
3298
diff
changeset
|
170 action="create_repo_field", conditions=dict(method=["PUT"], |
72a91632b731
repository extra fields implementation
Marcin Kuzminski <marcin@python-works.com>
parents:
3298
diff
changeset
|
171 function=check_repo)) |
72a91632b731
repository extra fields implementation
Marcin Kuzminski <marcin@python-works.com>
parents:
3298
diff
changeset
|
172 |
72a91632b731
repository extra fields implementation
Marcin Kuzminski <marcin@python-works.com>
parents:
3298
diff
changeset
|
173 m.connect('delete_repo_fields', "/repo_fields/{repo_name:.*?}/{field_id}", |
72a91632b731
repository extra fields implementation
Marcin Kuzminski <marcin@python-works.com>
parents:
3298
diff
changeset
|
174 action="delete_repo_field", conditions=dict(method=["DELETE"], |
72a91632b731
repository extra fields implementation
Marcin Kuzminski <marcin@python-works.com>
parents:
3298
diff
changeset
|
175 function=check_repo)) |
2833
2f3cba7b6d16
Add quick toggle link for locking for users with write or admin permissions
Marcin Kuzminski <marcin@python-works.com>
parents:
2822
diff
changeset
|
176 |
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
|
177 with rmap.submapper(path_prefix=ADMIN_PREFIX, |
dccba44ee176
translated resource map into full routes map, added validation for repos_group id
Marcin Kuzminski <marcin@python-works.com>
parents:
1333
diff
changeset
|
178 controller='admin/repos_groups') as m: |
dccba44ee176
translated resource map into full routes map, added validation for repos_group id
Marcin Kuzminski <marcin@python-works.com>
parents:
1333
diff
changeset
|
179 m.connect("repos_groups", "/repos_groups", |
dccba44ee176
translated resource map into full routes map, added validation for repos_group id
Marcin Kuzminski <marcin@python-works.com>
parents:
1333
diff
changeset
|
180 action="create", conditions=dict(method=["POST"])) |
dccba44ee176
translated resource map into full routes map, added validation for repos_group id
Marcin Kuzminski <marcin@python-works.com>
parents:
1333
diff
changeset
|
181 m.connect("repos_groups", "/repos_groups", |
dccba44ee176
translated resource map into full routes map, added validation for repos_group id
Marcin Kuzminski <marcin@python-works.com>
parents:
1333
diff
changeset
|
182 action="index", conditions=dict(method=["GET"])) |
dccba44ee176
translated resource map into full routes map, added validation for repos_group id
Marcin Kuzminski <marcin@python-works.com>
parents:
1333
diff
changeset
|
183 m.connect("formatted_repos_groups", "/repos_groups.{format}", |
dccba44ee176
translated resource map into full routes map, added validation for repos_group id
Marcin Kuzminski <marcin@python-works.com>
parents:
1333
diff
changeset
|
184 action="index", conditions=dict(method=["GET"])) |
dccba44ee176
translated resource map into full routes map, added validation for repos_group id
Marcin Kuzminski <marcin@python-works.com>
parents:
1333
diff
changeset
|
185 m.connect("new_repos_group", "/repos_groups/new", |
dccba44ee176
translated resource map into full routes map, added validation for repos_group id
Marcin Kuzminski <marcin@python-works.com>
parents:
1333
diff
changeset
|
186 action="new", conditions=dict(method=["GET"])) |
dccba44ee176
translated resource map into full routes map, added validation for repos_group id
Marcin Kuzminski <marcin@python-works.com>
parents:
1333
diff
changeset
|
187 m.connect("formatted_new_repos_group", "/repos_groups/new.{format}", |
dccba44ee176
translated resource map into full routes map, added validation for repos_group id
Marcin Kuzminski <marcin@python-works.com>
parents:
1333
diff
changeset
|
188 action="new", conditions=dict(method=["GET"])) |
3222
b4daef4cc26d
Group management delegation:
Marcin Kuzminski <marcin@python-works.com>
parents:
3154
diff
changeset
|
189 m.connect("update_repos_group", "/repos_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
|
190 action="update", conditions=dict(method=["PUT"], |
3222
b4daef4cc26d
Group management delegation:
Marcin Kuzminski <marcin@python-works.com>
parents:
3154
diff
changeset
|
191 function=check_group)) |
3715
25dbbdae3ed9
consistent handling of grant/revoke of permissions widgets
Marcin Kuzminski <marcin@python-works.com>
parents:
3714
diff
changeset
|
192 #add repo group perm member |
25dbbdae3ed9
consistent handling of grant/revoke of permissions widgets
Marcin Kuzminski <marcin@python-works.com>
parents:
3714
diff
changeset
|
193 m.connect('set_repo_group_perm_member', |
25dbbdae3ed9
consistent handling of grant/revoke of permissions widgets
Marcin Kuzminski <marcin@python-works.com>
parents:
3714
diff
changeset
|
194 "/repos_groups/{group_name:.*?}/grant_perm", |
25dbbdae3ed9
consistent handling of grant/revoke of permissions widgets
Marcin Kuzminski <marcin@python-works.com>
parents:
3714
diff
changeset
|
195 action="set_repo_group_perm_member", |
25dbbdae3ed9
consistent handling of grant/revoke of permissions widgets
Marcin Kuzminski <marcin@python-works.com>
parents:
3714
diff
changeset
|
196 conditions=dict(method=["POST"], function=check_group)) |
25dbbdae3ed9
consistent handling of grant/revoke of permissions widgets
Marcin Kuzminski <marcin@python-works.com>
parents:
3714
diff
changeset
|
197 |
25dbbdae3ed9
consistent handling of grant/revoke of permissions widgets
Marcin Kuzminski <marcin@python-works.com>
parents:
3714
diff
changeset
|
198 #ajax delete repo group perm |
25dbbdae3ed9
consistent handling of grant/revoke of permissions widgets
Marcin Kuzminski <marcin@python-works.com>
parents:
3714
diff
changeset
|
199 m.connect('delete_repo_group_perm_member', |
25dbbdae3ed9
consistent handling of grant/revoke of permissions widgets
Marcin Kuzminski <marcin@python-works.com>
parents:
3714
diff
changeset
|
200 "/repos_groups/{group_name:.*?}/revoke_perm", |
25dbbdae3ed9
consistent handling of grant/revoke of permissions widgets
Marcin Kuzminski <marcin@python-works.com>
parents:
3714
diff
changeset
|
201 action="delete_repo_group_perm_member", |
25dbbdae3ed9
consistent handling of grant/revoke of permissions widgets
Marcin Kuzminski <marcin@python-works.com>
parents:
3714
diff
changeset
|
202 conditions=dict(method=["DELETE"], function=check_group)) |
25dbbdae3ed9
consistent handling of grant/revoke of permissions widgets
Marcin Kuzminski <marcin@python-works.com>
parents:
3714
diff
changeset
|
203 |
3222
b4daef4cc26d
Group management delegation:
Marcin Kuzminski <marcin@python-works.com>
parents:
3154
diff
changeset
|
204 m.connect("delete_repos_group", "/repos_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
|
205 action="delete", conditions=dict(method=["DELETE"], |
3458
0ad025ee005e
better detection of deleting groups with subgroups inside.
Marcin Kuzminski <marcin@python-works.com>
parents:
3416
diff
changeset
|
206 function=check_group_skip_path)) |
3222
b4daef4cc26d
Group management delegation:
Marcin Kuzminski <marcin@python-works.com>
parents:
3154
diff
changeset
|
207 m.connect("edit_repos_group", "/repos_groups/{group_name:.*?}/edit", |
3458
0ad025ee005e
better detection of deleting groups with subgroups inside.
Marcin Kuzminski <marcin@python-works.com>
parents:
3416
diff
changeset
|
208 action="edit", conditions=dict(method=["GET"], |
0ad025ee005e
better detection of deleting groups with subgroups inside.
Marcin Kuzminski <marcin@python-works.com>
parents:
3416
diff
changeset
|
209 function=check_group)) |
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
|
210 m.connect("formatted_edit_repos_group", |
3222
b4daef4cc26d
Group management delegation:
Marcin Kuzminski <marcin@python-works.com>
parents:
3154
diff
changeset
|
211 "/repos_groups/{group_name:.*?}.{format}/edit", |
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
|
212 action="edit", conditions=dict(method=["GET"], |
3222
b4daef4cc26d
Group management delegation:
Marcin Kuzminski <marcin@python-works.com>
parents:
3154
diff
changeset
|
213 function=check_group)) |
b4daef4cc26d
Group management delegation:
Marcin Kuzminski <marcin@python-works.com>
parents:
3154
diff
changeset
|
214 m.connect("repos_group", "/repos_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
|
215 action="show", conditions=dict(method=["GET"], |
3222
b4daef4cc26d
Group management delegation:
Marcin Kuzminski <marcin@python-works.com>
parents:
3154
diff
changeset
|
216 function=check_group)) |
b4daef4cc26d
Group management delegation:
Marcin Kuzminski <marcin@python-works.com>
parents:
3154
diff
changeset
|
217 m.connect("formatted_repos_group", "/repos_groups/{group_name:.*?}.{format}", |
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
|
218 action="show", conditions=dict(method=["GET"], |
3222
b4daef4cc26d
Group management delegation:
Marcin Kuzminski <marcin@python-works.com>
parents:
3154
diff
changeset
|
219 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
|
220 |
959
fff21c9b075c
#56 fixed found bugs, implemented adding of new group + forms+validators
Marcin Kuzminski <marcin@python-works.com>
parents:
956
diff
changeset
|
221 #ADMIN USER 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
|
222 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
|
223 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
|
224 m.connect("users", "/users", |
a1bcfe58a1ab
Fixed #161 form saves the create repository permission.
Marcin Kuzminski <marcin@python-works.com>
parents:
1214
diff
changeset
|
225 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
|
226 m.connect("users", "/users", |
a1bcfe58a1ab
Fixed #161 form saves the create repository permission.
Marcin Kuzminski <marcin@python-works.com>
parents:
1214
diff
changeset
|
227 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
|
228 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
|
229 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
|
230 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
|
231 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
|
232 m.connect("formatted_new_user", "/users/new.{format}", |
a1bcfe58a1ab
Fixed #161 form saves the create repository permission.
Marcin Kuzminski <marcin@python-works.com>
parents:
1214
diff
changeset
|
233 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
|
234 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
|
235 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
|
236 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
|
237 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
|
238 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
|
239 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
|
240 m.connect("formatted_edit_user", |
a1bcfe58a1ab
Fixed #161 form saves the create repository permission.
Marcin Kuzminski <marcin@python-works.com>
parents:
1214
diff
changeset
|
241 "/users/{id}.{format}/edit", |
a1bcfe58a1ab
Fixed #161 form saves the create repository permission.
Marcin Kuzminski <marcin@python-works.com>
parents:
1214
diff
changeset
|
242 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
|
243 m.connect("user", "/users/{id}", |
a1bcfe58a1ab
Fixed #161 form saves the create repository permission.
Marcin Kuzminski <marcin@python-works.com>
parents:
1214
diff
changeset
|
244 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
|
245 m.connect("formatted_user", "/users/{id}.{format}", |
a1bcfe58a1ab
Fixed #161 form saves the create repository permission.
Marcin Kuzminski <marcin@python-works.com>
parents:
1214
diff
changeset
|
246 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
|
247 |
a1bcfe58a1ab
Fixed #161 form saves the create repository permission.
Marcin Kuzminski <marcin@python-works.com>
parents:
1214
diff
changeset
|
248 #EXTRAS USER ROUTES |
a1bcfe58a1ab
Fixed #161 form saves the create repository permission.
Marcin Kuzminski <marcin@python-works.com>
parents:
1214
diff
changeset
|
249 m.connect("user_perm", "/users_perm/{id}", |
a1bcfe58a1ab
Fixed #161 form saves the create repository permission.
Marcin Kuzminski <marcin@python-works.com>
parents:
1214
diff
changeset
|
250 action="update_perm", conditions=dict(method=["PUT"])) |
2330
b0fef8a77568
Added simple UI for admin to manage emails map
Marcin Kuzminski <marcin@python-works.com>
parents:
2244
diff
changeset
|
251 m.connect("user_emails", "/users_emails/{id}", |
b0fef8a77568
Added simple UI for admin to manage emails map
Marcin Kuzminski <marcin@python-works.com>
parents:
2244
diff
changeset
|
252 action="add_email", conditions=dict(method=["PUT"])) |
b0fef8a77568
Added simple UI for admin to manage emails map
Marcin Kuzminski <marcin@python-works.com>
parents:
2244
diff
changeset
|
253 m.connect("user_emails_delete", "/users_emails/{id}", |
b0fef8a77568
Added simple UI for admin to manage emails map
Marcin Kuzminski <marcin@python-works.com>
parents:
2244
diff
changeset
|
254 action="delete_email", conditions=dict(method=["DELETE"])) |
3125
9b92cf5a0cca
Added UserIpMap interface for allowed IP addresses and IP restriction access
Marcin Kuzminski <marcin@python-works.com>
parents:
3056
diff
changeset
|
255 m.connect("user_ips", "/users_ips/{id}", |
9b92cf5a0cca
Added UserIpMap interface for allowed IP addresses and IP restriction access
Marcin Kuzminski <marcin@python-works.com>
parents:
3056
diff
changeset
|
256 action="add_ip", conditions=dict(method=["PUT"])) |
9b92cf5a0cca
Added UserIpMap interface for allowed IP addresses and IP restriction access
Marcin Kuzminski <marcin@python-works.com>
parents:
3056
diff
changeset
|
257 m.connect("user_ips_delete", "/users_ips/{id}", |
9b92cf5a0cca
Added UserIpMap interface for allowed IP addresses and IP restriction access
Marcin Kuzminski <marcin@python-works.com>
parents:
3056
diff
changeset
|
258 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
|
259 |
3410
5f1850e4712a
"Users groups" is grammatically incorrect English - rename to "user groups"
Mads Kiilerich <madski@unity3d.com>
parents:
3322
diff
changeset
|
260 #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
|
261 with rmap.submapper(path_prefix=ADMIN_PREFIX, |
1271
aa7e45ad0cea
Fixed permissions for users groups, group can have create repo permission now.
Marcin Kuzminski <marcin@python-works.com>
parents:
1266
diff
changeset
|
262 controller='admin/users_groups') as m: |
aa7e45ad0cea
Fixed permissions for users groups, group can have create repo permission now.
Marcin Kuzminski <marcin@python-works.com>
parents:
1266
diff
changeset
|
263 m.connect("users_groups", "/users_groups", |
aa7e45ad0cea
Fixed permissions for users groups, group can have create repo permission now.
Marcin Kuzminski <marcin@python-works.com>
parents:
1266
diff
changeset
|
264 action="create", conditions=dict(method=["POST"])) |
aa7e45ad0cea
Fixed permissions for users groups, group can have create repo permission now.
Marcin Kuzminski <marcin@python-works.com>
parents:
1266
diff
changeset
|
265 m.connect("users_groups", "/users_groups", |
aa7e45ad0cea
Fixed permissions for users groups, group can have create repo permission now.
Marcin Kuzminski <marcin@python-works.com>
parents:
1266
diff
changeset
|
266 action="index", 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
|
267 m.connect("formatted_users_groups", "/users_groups.{format}", |
aa7e45ad0cea
Fixed permissions for users groups, group can have create repo permission now.
Marcin Kuzminski <marcin@python-works.com>
parents:
1266
diff
changeset
|
268 action="index", 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
|
269 m.connect("new_users_group", "/users_groups/new", |
aa7e45ad0cea
Fixed permissions for users groups, group can have create repo permission now.
Marcin Kuzminski <marcin@python-works.com>
parents:
1266
diff
changeset
|
270 action="new", 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
|
271 m.connect("formatted_new_users_group", "/users_groups/new.{format}", |
aa7e45ad0cea
Fixed permissions for users groups, group can have create repo permission now.
Marcin Kuzminski <marcin@python-works.com>
parents:
1266
diff
changeset
|
272 action="new", 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
|
273 m.connect("update_users_group", "/users_groups/{id}", |
aa7e45ad0cea
Fixed permissions for users groups, group can have create repo permission now.
Marcin Kuzminski <marcin@python-works.com>
parents:
1266
diff
changeset
|
274 action="update", conditions=dict(method=["PUT"])) |
aa7e45ad0cea
Fixed permissions for users groups, group can have create repo permission now.
Marcin Kuzminski <marcin@python-works.com>
parents:
1266
diff
changeset
|
275 m.connect("delete_users_group", "/users_groups/{id}", |
aa7e45ad0cea
Fixed permissions for users groups, group can have create repo permission now.
Marcin Kuzminski <marcin@python-works.com>
parents:
1266
diff
changeset
|
276 action="delete", conditions=dict(method=["DELETE"])) |
aa7e45ad0cea
Fixed permissions for users groups, group can have create repo permission now.
Marcin Kuzminski <marcin@python-works.com>
parents:
1266
diff
changeset
|
277 m.connect("edit_users_group", "/users_groups/{id}/edit", |
3734
a8f520540ab0
New default permissions definition for user group create
Marcin Kuzminski <marcin@python-works.com>
parents:
3715
diff
changeset
|
278 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
|
279 function=check_user_group) |
1271
aa7e45ad0cea
Fixed permissions for users groups, group can have create repo permission now.
Marcin Kuzminski <marcin@python-works.com>
parents:
1266
diff
changeset
|
280 m.connect("formatted_edit_users_group", |
aa7e45ad0cea
Fixed permissions for users groups, group can have create repo permission now.
Marcin Kuzminski <marcin@python-works.com>
parents:
1266
diff
changeset
|
281 "/users_groups/{id}.{format}/edit", |
aa7e45ad0cea
Fixed permissions for users groups, group can have create repo permission now.
Marcin Kuzminski <marcin@python-works.com>
parents:
1266
diff
changeset
|
282 action="edit", 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
|
283 m.connect("users_group", "/users_groups/{id}", |
aa7e45ad0cea
Fixed permissions for users groups, group can have create repo permission now.
Marcin Kuzminski <marcin@python-works.com>
parents:
1266
diff
changeset
|
284 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
|
285 m.connect("formatted_users_group", "/users_groups/{id}.{format}", |
aa7e45ad0cea
Fixed permissions for users groups, group can have create repo permission now.
Marcin Kuzminski <marcin@python-works.com>
parents:
1266
diff
changeset
|
286 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
|
287 |
aa7e45ad0cea
Fixed permissions for users groups, group can have create repo permission now.
Marcin Kuzminski <marcin@python-works.com>
parents:
1266
diff
changeset
|
288 #EXTRAS USER ROUTES |
3714
7e3d89d9d3a2
- Manage User’s Groups: create, delete, rename, add/remove users inside.
Marcin Kuzminski <marcin@python-works.com>
parents:
3695
diff
changeset
|
289 # update |
7e3d89d9d3a2
- Manage User’s Groups: create, delete, rename, add/remove users inside.
Marcin Kuzminski <marcin@python-works.com>
parents:
3695
diff
changeset
|
290 m.connect("users_group_perm", "/users_groups/{id}/update_global_perm", |
1271
aa7e45ad0cea
Fixed permissions for users groups, group can have create repo permission now.
Marcin Kuzminski <marcin@python-works.com>
parents:
1266
diff
changeset
|
291 action="update_perm", conditions=dict(method=["PUT"])) |
956
83d35d716a02
started working on issue #56
Marcin Kuzminski <marcin@python-works.com>
parents:
872
diff
changeset
|
292 |
3714
7e3d89d9d3a2
- Manage User’s Groups: create, delete, rename, add/remove users inside.
Marcin Kuzminski <marcin@python-works.com>
parents:
3695
diff
changeset
|
293 #add user group perm member |
7e3d89d9d3a2
- Manage User’s Groups: create, delete, rename, add/remove users inside.
Marcin Kuzminski <marcin@python-works.com>
parents:
3695
diff
changeset
|
294 m.connect('set_user_group_perm_member', "/users_groups/{id}/grant_perm", |
7e3d89d9d3a2
- Manage User’s Groups: create, delete, rename, add/remove users inside.
Marcin Kuzminski <marcin@python-works.com>
parents:
3695
diff
changeset
|
295 action="set_user_group_perm_member", |
7e3d89d9d3a2
- Manage User’s Groups: create, delete, rename, add/remove users inside.
Marcin Kuzminski <marcin@python-works.com>
parents:
3695
diff
changeset
|
296 conditions=dict(method=["POST"])) |
7e3d89d9d3a2
- Manage User’s Groups: create, delete, rename, add/remove users inside.
Marcin Kuzminski <marcin@python-works.com>
parents:
3695
diff
changeset
|
297 |
7e3d89d9d3a2
- Manage User’s Groups: create, delete, rename, add/remove users inside.
Marcin Kuzminski <marcin@python-works.com>
parents:
3695
diff
changeset
|
298 #ajax delete user group perm |
7e3d89d9d3a2
- Manage User’s Groups: create, delete, rename, add/remove users inside.
Marcin Kuzminski <marcin@python-works.com>
parents:
3695
diff
changeset
|
299 m.connect('delete_user_group_perm_member', "/users_groups/{id}/revoke_perm", |
7e3d89d9d3a2
- Manage User’s Groups: create, delete, rename, add/remove users inside.
Marcin Kuzminski <marcin@python-works.com>
parents:
3695
diff
changeset
|
300 action="delete_user_group_perm_member", |
7e3d89d9d3a2
- Manage User’s Groups: create, delete, rename, add/remove users inside.
Marcin Kuzminski <marcin@python-works.com>
parents:
3695
diff
changeset
|
301 conditions=dict(method=["DELETE"])) |
7e3d89d9d3a2
- Manage User’s Groups: create, delete, rename, add/remove users inside.
Marcin Kuzminski <marcin@python-works.com>
parents:
3695
diff
changeset
|
302 |
956
83d35d716a02
started working on issue #56
Marcin Kuzminski <marcin@python-works.com>
parents:
872
diff
changeset
|
303 #ADMIN GROUP REST ROUTES |
1266
a1bcfe58a1ab
Fixed #161 form saves the create repository permission.
Marcin Kuzminski <marcin@python-works.com>
parents:
1214
diff
changeset
|
304 rmap.resource('group', 'groups', |
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
|
305 controller='admin/groups', path_prefix=ADMIN_PREFIX) |
604
5cc96df705b9
fixed @repo into :repo for docs
Marcin Kuzminski <marcin@python-works.com>
parents:
547
diff
changeset
|
306 |
5cc96df705b9
fixed @repo into :repo for docs
Marcin Kuzminski <marcin@python-works.com>
parents:
547
diff
changeset
|
307 #ADMIN PERMISSIONS REST ROUTES |
1211 | 308 rmap.resource('permission', 'permissions', |
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
|
309 controller='admin/permissions', path_prefix=ADMIN_PREFIX) |
769
4bdcc08b04c4
fixes #77 moved out ldap config to it's own section
Marcin Kuzminski <marcin@python-works.com>
parents:
734
diff
changeset
|
310 |
3056
6104dfd35b16
Implemented #379 defaults settings page for creation of repositories
Marcin Kuzminski <marcin@python-works.com>
parents:
3040
diff
changeset
|
311 #ADMIN DEFAULTS REST ROUTES |
6104dfd35b16
Implemented #379 defaults settings page for creation of repositories
Marcin Kuzminski <marcin@python-works.com>
parents:
3040
diff
changeset
|
312 rmap.resource('default', 'defaults', |
6104dfd35b16
Implemented #379 defaults settings page for creation of repositories
Marcin Kuzminski <marcin@python-works.com>
parents:
3040
diff
changeset
|
313 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
|
314 |
769
4bdcc08b04c4
fixes #77 moved out ldap config to it's own section
Marcin Kuzminski <marcin@python-works.com>
parents:
734
diff
changeset
|
315 ##ADMIN LDAP SETTINGS |
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
|
316 rmap.connect('ldap_settings', '%s/ldap' % ADMIN_PREFIX, |
1211 | 317 controller='admin/ldap_settings', action='ldap_settings', |
318 conditions=dict(method=["POST"])) | |
1266
a1bcfe58a1ab
Fixed #161 form saves the create repository permission.
Marcin Kuzminski <marcin@python-works.com>
parents:
1214
diff
changeset
|
319 |
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
|
320 rmap.connect('ldap_home', '%s/ldap' % ADMIN_PREFIX, |
1211 | 321 controller='admin/ldap_settings') |
705
9e9f1b919c0c
implements #60, ldap configuration and authentication.
Marcin Kuzminski <marcin@python-works.com>
parents:
636
diff
changeset
|
322 |
604
5cc96df705b9
fixed @repo into :repo for docs
Marcin Kuzminski <marcin@python-works.com>
parents:
547
diff
changeset
|
323 #ADMIN SETTINGS 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
|
324 with rmap.submapper(path_prefix=ADMIN_PREFIX, |
1211 | 325 controller='admin/settings') as m: |
371
5cd6616b8673
routes python 2.5 compatible
Marcin Kuzminski <marcin@python-works.com>
parents:
363
diff
changeset
|
326 m.connect("admin_settings", "/settings", |
1211 | 327 action="create", conditions=dict(method=["POST"])) |
371
5cd6616b8673
routes python 2.5 compatible
Marcin Kuzminski <marcin@python-works.com>
parents:
363
diff
changeset
|
328 m.connect("admin_settings", "/settings", |
1211 | 329 action="index", conditions=dict(method=["GET"])) |
459
7c978511c951
implemented basic (startup) nose test suite.
Marcin Kuzminski <marcin@python-works.com>
parents:
406
diff
changeset
|
330 m.connect("formatted_admin_settings", "/settings.{format}", |
1211 | 331 action="index", conditions=dict(method=["GET"])) |
371
5cd6616b8673
routes python 2.5 compatible
Marcin Kuzminski <marcin@python-works.com>
parents:
363
diff
changeset
|
332 m.connect("admin_new_setting", "/settings/new", |
1211 | 333 action="new", conditions=dict(method=["GET"])) |
459
7c978511c951
implemented basic (startup) nose test suite.
Marcin Kuzminski <marcin@python-works.com>
parents:
406
diff
changeset
|
334 m.connect("formatted_admin_new_setting", "/settings/new.{format}", |
1211 | 335 action="new", conditions=dict(method=["GET"])) |
371
5cd6616b8673
routes python 2.5 compatible
Marcin Kuzminski <marcin@python-works.com>
parents:
363
diff
changeset
|
336 m.connect("/settings/{setting_id}", |
1211 | 337 action="update", conditions=dict(method=["PUT"])) |
371
5cd6616b8673
routes python 2.5 compatible
Marcin Kuzminski <marcin@python-works.com>
parents:
363
diff
changeset
|
338 m.connect("/settings/{setting_id}", |
1211 | 339 action="delete", conditions=dict(method=["DELETE"])) |
371
5cd6616b8673
routes python 2.5 compatible
Marcin Kuzminski <marcin@python-works.com>
parents:
363
diff
changeset
|
340 m.connect("admin_edit_setting", "/settings/{setting_id}/edit", |
1211 | 341 action="edit", conditions=dict(method=["GET"])) |
342 m.connect("formatted_admin_edit_setting", | |
343 "/settings/{setting_id}.{format}/edit", | |
344 action="edit", conditions=dict(method=["GET"])) | |
371
5cd6616b8673
routes python 2.5 compatible
Marcin Kuzminski <marcin@python-works.com>
parents:
363
diff
changeset
|
345 m.connect("admin_setting", "/settings/{setting_id}", |
1211 | 346 action="show", conditions=dict(method=["GET"])) |
459
7c978511c951
implemented basic (startup) nose test suite.
Marcin Kuzminski <marcin@python-works.com>
parents:
406
diff
changeset
|
347 m.connect("formatted_admin_setting", "/settings/{setting_id}.{format}", |
1211 | 348 action="show", conditions=dict(method=["GET"])) |
371
5cd6616b8673
routes python 2.5 compatible
Marcin Kuzminski <marcin@python-works.com>
parents:
363
diff
changeset
|
349 m.connect("admin_settings_my_account", "/my_account", |
1211 | 350 action="my_account", conditions=dict(method=["GET"])) |
371
5cd6616b8673
routes python 2.5 compatible
Marcin Kuzminski <marcin@python-works.com>
parents:
363
diff
changeset
|
351 m.connect("admin_settings_my_account_update", "/my_account_update", |
1211 | 352 action="my_account_update", conditions=dict(method=["PUT"])) |
2624
19daa8d761dc
Improvements to my account page
Marcin Kuzminski <marcin@python-works.com>
parents:
2614
diff
changeset
|
353 m.connect("admin_settings_my_repos", "/my_account/repos", |
19daa8d761dc
Improvements to my account page
Marcin Kuzminski <marcin@python-works.com>
parents:
2614
diff
changeset
|
354 action="my_account_my_repos", conditions=dict(method=["GET"])) |
19daa8d761dc
Improvements to my account page
Marcin Kuzminski <marcin@python-works.com>
parents:
2614
diff
changeset
|
355 m.connect("admin_settings_my_pullrequests", "/my_account/pull_requests", |
19daa8d761dc
Improvements to my account page
Marcin Kuzminski <marcin@python-works.com>
parents:
2614
diff
changeset
|
356 action="my_account_my_pullrequests", conditions=dict(method=["GET"])) |
19daa8d761dc
Improvements to my account page
Marcin Kuzminski <marcin@python-works.com>
parents:
2614
diff
changeset
|
357 |
1712
cac5109ac3b6
Notification system improvements
Marcin Kuzminski <marcin@python-works.com>
parents:
1702
diff
changeset
|
358 #NOTIFICATION REST ROUTES |
cac5109ac3b6
Notification system improvements
Marcin Kuzminski <marcin@python-works.com>
parents:
1702
diff
changeset
|
359 with rmap.submapper(path_prefix=ADMIN_PREFIX, |
cac5109ac3b6
Notification system improvements
Marcin Kuzminski <marcin@python-works.com>
parents:
1702
diff
changeset
|
360 controller='admin/notifications') as m: |
cac5109ac3b6
Notification system improvements
Marcin Kuzminski <marcin@python-works.com>
parents:
1702
diff
changeset
|
361 m.connect("notifications", "/notifications", |
cac5109ac3b6
Notification system improvements
Marcin Kuzminski <marcin@python-works.com>
parents:
1702
diff
changeset
|
362 action="create", conditions=dict(method=["POST"])) |
cac5109ac3b6
Notification system improvements
Marcin Kuzminski <marcin@python-works.com>
parents:
1702
diff
changeset
|
363 m.connect("notifications", "/notifications", |
cac5109ac3b6
Notification system improvements
Marcin Kuzminski <marcin@python-works.com>
parents:
1702
diff
changeset
|
364 action="index", conditions=dict(method=["GET"])) |
1791
2aee0dc1784e
mark all read button for notifications
Marcin Kuzminski <marcin@python-works.com>
parents:
1755
diff
changeset
|
365 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
|
366 action="mark_all_read", conditions=dict(method=["GET"])) |
1712
cac5109ac3b6
Notification system improvements
Marcin Kuzminski <marcin@python-works.com>
parents:
1702
diff
changeset
|
367 m.connect("formatted_notifications", "/notifications.{format}", |
cac5109ac3b6
Notification system improvements
Marcin Kuzminski <marcin@python-works.com>
parents:
1702
diff
changeset
|
368 action="index", conditions=dict(method=["GET"])) |
cac5109ac3b6
Notification system improvements
Marcin Kuzminski <marcin@python-works.com>
parents:
1702
diff
changeset
|
369 m.connect("new_notification", "/notifications/new", |
cac5109ac3b6
Notification system improvements
Marcin Kuzminski <marcin@python-works.com>
parents:
1702
diff
changeset
|
370 action="new", conditions=dict(method=["GET"])) |
cac5109ac3b6
Notification system improvements
Marcin Kuzminski <marcin@python-works.com>
parents:
1702
diff
changeset
|
371 m.connect("formatted_new_notification", "/notifications/new.{format}", |
cac5109ac3b6
Notification system improvements
Marcin Kuzminski <marcin@python-works.com>
parents:
1702
diff
changeset
|
372 action="new", conditions=dict(method=["GET"])) |
cac5109ac3b6
Notification system improvements
Marcin Kuzminski <marcin@python-works.com>
parents:
1702
diff
changeset
|
373 m.connect("/notification/{notification_id}", |
cac5109ac3b6
Notification system improvements
Marcin Kuzminski <marcin@python-works.com>
parents:
1702
diff
changeset
|
374 action="update", conditions=dict(method=["PUT"])) |
cac5109ac3b6
Notification system improvements
Marcin Kuzminski <marcin@python-works.com>
parents:
1702
diff
changeset
|
375 m.connect("/notification/{notification_id}", |
cac5109ac3b6
Notification system improvements
Marcin Kuzminski <marcin@python-works.com>
parents:
1702
diff
changeset
|
376 action="delete", conditions=dict(method=["DELETE"])) |
cac5109ac3b6
Notification system improvements
Marcin Kuzminski <marcin@python-works.com>
parents:
1702
diff
changeset
|
377 m.connect("edit_notification", "/notification/{notification_id}/edit", |
cac5109ac3b6
Notification system improvements
Marcin Kuzminski <marcin@python-works.com>
parents:
1702
diff
changeset
|
378 action="edit", conditions=dict(method=["GET"])) |
cac5109ac3b6
Notification system improvements
Marcin Kuzminski <marcin@python-works.com>
parents:
1702
diff
changeset
|
379 m.connect("formatted_edit_notification", |
cac5109ac3b6
Notification system improvements
Marcin Kuzminski <marcin@python-works.com>
parents:
1702
diff
changeset
|
380 "/notification/{notification_id}.{format}/edit", |
cac5109ac3b6
Notification system improvements
Marcin Kuzminski <marcin@python-works.com>
parents:
1702
diff
changeset
|
381 action="edit", conditions=dict(method=["GET"])) |
cac5109ac3b6
Notification system improvements
Marcin Kuzminski <marcin@python-works.com>
parents:
1702
diff
changeset
|
382 m.connect("notification", "/notification/{notification_id}", |
cac5109ac3b6
Notification system improvements
Marcin Kuzminski <marcin@python-works.com>
parents:
1702
diff
changeset
|
383 action="show", conditions=dict(method=["GET"])) |
cac5109ac3b6
Notification system improvements
Marcin Kuzminski <marcin@python-works.com>
parents:
1702
diff
changeset
|
384 m.connect("formatted_notification", "/notifications/{notification_id}.{format}", |
cac5109ac3b6
Notification system improvements
Marcin Kuzminski <marcin@python-works.com>
parents:
1702
diff
changeset
|
385 action="show", conditions=dict(method=["GET"])) |
cac5109ac3b6
Notification system improvements
Marcin Kuzminski <marcin@python-works.com>
parents:
1702
diff
changeset
|
386 |
3866
1fdec7e3aeb2
refactored url.resource to full definition of routes
Marcin Kuzminski <marcin@python-works.com>
parents:
3840
diff
changeset
|
387 #ADMIN GIST |
1fdec7e3aeb2
refactored url.resource to full definition of routes
Marcin Kuzminski <marcin@python-works.com>
parents:
3840
diff
changeset
|
388 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
|
389 controller='admin/gists') as m: |
1fdec7e3aeb2
refactored url.resource to full definition of routes
Marcin Kuzminski <marcin@python-works.com>
parents:
3840
diff
changeset
|
390 m.connect("gists", "/gists", |
1fdec7e3aeb2
refactored url.resource to full definition of routes
Marcin Kuzminski <marcin@python-works.com>
parents:
3840
diff
changeset
|
391 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
|
392 m.connect("gists", "/gists", |
1fdec7e3aeb2
refactored url.resource to full definition of routes
Marcin Kuzminski <marcin@python-works.com>
parents:
3840
diff
changeset
|
393 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
|
394 m.connect("formatted_gists", "/gists.{format}", |
1fdec7e3aeb2
refactored url.resource to full definition of routes
Marcin Kuzminski <marcin@python-works.com>
parents:
3840
diff
changeset
|
395 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
|
396 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
|
397 action="new", conditions=dict(method=["GET"])) |
1fdec7e3aeb2
refactored url.resource to full definition of routes
Marcin Kuzminski <marcin@python-works.com>
parents:
3840
diff
changeset
|
398 m.connect("formatted_new_gist", "/gists/new.{format}", |
1fdec7e3aeb2
refactored url.resource to full definition of routes
Marcin Kuzminski <marcin@python-works.com>
parents:
3840
diff
changeset
|
399 action="new", conditions=dict(method=["GET"])) |
1fdec7e3aeb2
refactored url.resource to full definition of routes
Marcin Kuzminski <marcin@python-works.com>
parents:
3840
diff
changeset
|
400 m.connect("/gist/{gist_id}", |
1fdec7e3aeb2
refactored url.resource to full definition of routes
Marcin Kuzminski <marcin@python-works.com>
parents:
3840
diff
changeset
|
401 action="update", conditions=dict(method=["PUT"])) |
1fdec7e3aeb2
refactored url.resource to full definition of routes
Marcin Kuzminski <marcin@python-works.com>
parents:
3840
diff
changeset
|
402 m.connect("/gist/{gist_id}", |
1fdec7e3aeb2
refactored url.resource to full definition of routes
Marcin Kuzminski <marcin@python-works.com>
parents:
3840
diff
changeset
|
403 action="delete", conditions=dict(method=["DELETE"])) |
1fdec7e3aeb2
refactored url.resource to full definition of routes
Marcin Kuzminski <marcin@python-works.com>
parents:
3840
diff
changeset
|
404 m.connect("edit_gist", "/gist/{gist_id}/edit", |
1fdec7e3aeb2
refactored url.resource to full definition of routes
Marcin Kuzminski <marcin@python-works.com>
parents:
3840
diff
changeset
|
405 action="edit", conditions=dict(method=["GET"])) |
1fdec7e3aeb2
refactored url.resource to full definition of routes
Marcin Kuzminski <marcin@python-works.com>
parents:
3840
diff
changeset
|
406 m.connect("formatted_edit_gist", |
1fdec7e3aeb2
refactored url.resource to full definition of routes
Marcin Kuzminski <marcin@python-works.com>
parents:
3840
diff
changeset
|
407 "/gist/{gist_id}.{format}/edit", |
1fdec7e3aeb2
refactored url.resource to full definition of routes
Marcin Kuzminski <marcin@python-works.com>
parents:
3840
diff
changeset
|
408 action="edit", conditions=dict(method=["GET"])) |
1fdec7e3aeb2
refactored url.resource to full definition of routes
Marcin Kuzminski <marcin@python-works.com>
parents:
3840
diff
changeset
|
409 m.connect("gist", "/gist/{gist_id}", |
1fdec7e3aeb2
refactored url.resource to full definition of routes
Marcin Kuzminski <marcin@python-works.com>
parents:
3840
diff
changeset
|
410 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
|
411 m.connect("formatted_gist", "/gists/{gist_id}.{format}", |
1fdec7e3aeb2
refactored url.resource to full definition of routes
Marcin Kuzminski <marcin@python-works.com>
parents:
3840
diff
changeset
|
412 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
|
413 |
604
5cc96df705b9
fixed @repo into :repo for docs
Marcin Kuzminski <marcin@python-works.com>
parents:
547
diff
changeset
|
414 #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
|
415 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
|
416 controller='admin/admin') as m: |
1211 | 417 m.connect('admin_home', '', action='index') |
149
b3c93efd1c97
Updated template for summary (archives links)
Marcin Kuzminski <marcin@python-works.com>
parents:
148
diff
changeset
|
418 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
|
419 action='add_repo') |
1445
c78f6bf52e9c
Beginning of API implementation for rhodecode
Marcin Kuzminski <marcin@python-works.com>
parents:
1431
diff
changeset
|
420 #========================================================================== |
1982
87f0800abc7b
#227 Initial version of repository groups permissions system
Marcin Kuzminski <marcin@python-works.com>
parents:
1818
diff
changeset
|
421 # API V2 |
1445
c78f6bf52e9c
Beginning of API implementation for rhodecode
Marcin Kuzminski <marcin@python-works.com>
parents:
1431
diff
changeset
|
422 #========================================================================== |
c78f6bf52e9c
Beginning of API implementation for rhodecode
Marcin Kuzminski <marcin@python-works.com>
parents:
1431
diff
changeset
|
423 with rmap.submapper(path_prefix=ADMIN_PREFIX, |
c78f6bf52e9c
Beginning of API implementation for rhodecode
Marcin Kuzminski <marcin@python-works.com>
parents:
1431
diff
changeset
|
424 controller='api/api') as m: |
c78f6bf52e9c
Beginning of API implementation for rhodecode
Marcin Kuzminski <marcin@python-works.com>
parents:
1431
diff
changeset
|
425 m.connect('api', '/api') |
c78f6bf52e9c
Beginning of API implementation for rhodecode
Marcin Kuzminski <marcin@python-works.com>
parents:
1431
diff
changeset
|
426 |
1211 | 427 #USER JOURNAL |
2397
d815d617eb5e
added rss/atom feeds into personalized journal
Marcin Kuzminski <marcin@python-works.com>
parents:
2390
diff
changeset
|
428 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
|
429 controller='journal', action='index') |
d815d617eb5e
added rss/atom feeds into personalized journal
Marcin Kuzminski <marcin@python-works.com>
parents:
2390
diff
changeset
|
430 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
|
431 controller='journal', action='journal_rss') |
d815d617eb5e
added rss/atom feeds into personalized journal
Marcin Kuzminski <marcin@python-works.com>
parents:
2390
diff
changeset
|
432 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
|
433 controller='journal', action='journal_atom') |
734
49eb69d78988
implemented user dashboards, and following system.
Marcin Kuzminski <marcin@python-works.com>
parents:
708
diff
changeset
|
434 |
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
|
435 rmap.connect('public_journal', '%s/public_journal' % ADMIN_PREFIX, |
1211 | 436 controller='journal', action="public_journal") |
437 | |
2390
b0d09c20f608
public journal feed updates. fixes errors
Marcin Kuzminski <marcin@python-works.com>
parents:
2370
diff
changeset
|
438 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
|
439 controller='journal', action="public_journal_rss") |
b0d09c20f608
public journal feed updates. fixes errors
Marcin Kuzminski <marcin@python-works.com>
parents:
2370
diff
changeset
|
440 |
b0d09c20f608
public journal feed updates. fixes errors
Marcin Kuzminski <marcin@python-works.com>
parents:
2370
diff
changeset
|
441 rmap.connect('public_journal_rss_old', '%s/public_journal_rss' % ADMIN_PREFIX, |
1211 | 442 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
|
443 |
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
|
444 rmap.connect('public_journal_atom', |
2390
b0d09c20f608
public journal feed updates. fixes errors
Marcin Kuzminski <marcin@python-works.com>
parents:
2370
diff
changeset
|
445 '%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
|
446 action="public_journal_atom") |
b0d09c20f608
public journal feed updates. fixes errors
Marcin Kuzminski <marcin@python-works.com>
parents:
2370
diff
changeset
|
447 |
b0d09c20f608
public journal feed updates. fixes errors
Marcin Kuzminski <marcin@python-works.com>
parents:
2370
diff
changeset
|
448 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
|
449 '%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
|
450 action="public_journal_atom") |
734
49eb69d78988
implemented user dashboards, and following system.
Marcin Kuzminski <marcin@python-works.com>
parents:
708
diff
changeset
|
451 |
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 rmap.connect('toggle_following', '%s/toggle_following' % ADMIN_PREFIX, |
1211 | 453 controller='journal', action='toggle_following', |
454 conditions=dict(method=["POST"])) | |
734
49eb69d78988
implemented user dashboards, and following system.
Marcin Kuzminski <marcin@python-works.com>
parents:
708
diff
changeset
|
455 |
406
b153a51b1d3b
Implemented search using whoosh. Still as experimental option.
Marcin Kuzminski <marcin@python-works.com>
parents:
380
diff
changeset
|
456 #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
|
457 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
|
458 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
|
459 controller='search', |
b38230cf8710
add condition check for old search url in admin
Marcin Kuzminski <marcin@python-works.com>
parents:
3289
diff
changeset
|
460 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
|
461 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
|
462 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
|
463 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
|
464 ) |
604
5cc96df705b9
fixed @repo into :repo for docs
Marcin Kuzminski <marcin@python-works.com>
parents:
547
diff
changeset
|
465 |
474
a3d9d24acbec
Implemented password reset(forms/models/ tasks) and mailing tasks.
Marcin Kuzminski <marcin@python-works.com>
parents:
466
diff
changeset
|
466 #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
|
467 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
|
468 rmap.connect('logout_home', '%s/logout' % ADMIN_PREFIX, controller='login', |
1211 | 469 action='logout') |
470 | |
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
|
471 rmap.connect('register', '%s/register' % ADMIN_PREFIX, controller='login', |
1211 | 472 action='register') |
473 | |
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
|
474 rmap.connect('reset_password', '%s/password_reset' % ADMIN_PREFIX, |
1211 | 475 controller='login', action='password_reset') |
604
5cc96df705b9
fixed @repo into :repo for docs
Marcin Kuzminski <marcin@python-works.com>
parents:
547
diff
changeset
|
476 |
1417
5875955def39
fixes #223 improve password reset form
Marcin Kuzminski <marcin@python-works.com>
parents:
1348
diff
changeset
|
477 rmap.connect('reset_password_confirmation', |
5875955def39
fixes #223 improve password reset form
Marcin Kuzminski <marcin@python-works.com>
parents:
1348
diff
changeset
|
478 '%s/password_reset_confirmation' % ADMIN_PREFIX, |
5875955def39
fixes #223 improve password reset form
Marcin Kuzminski <marcin@python-works.com>
parents:
1348
diff
changeset
|
479 controller='login', action='password_reset_confirmation') |
5875955def39
fixes #223 improve password reset form
Marcin Kuzminski <marcin@python-works.com>
parents:
1348
diff
changeset
|
480 |
205
66b20f525750
Added feed controllers, urls,and changed index page to use them.
Marcin Kuzminski <marcin@python-works.com>
parents:
181
diff
changeset
|
481 #FEEDS |
2692
1f75b23c3e26
switched repo_name to non greedy match.
Marcin Kuzminski <marcin@python-works.com>
parents:
2631
diff
changeset
|
482 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
|
483 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
|
484 conditions=dict(function=check_repo)) |
1211 | 485 |
2692
1f75b23c3e26
switched repo_name to non greedy match.
Marcin Kuzminski <marcin@python-works.com>
parents:
2631
diff
changeset
|
486 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
|
487 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
|
488 conditions=dict(function=check_repo)) |
604
5cc96df705b9
fixed @repo into :repo for docs
Marcin Kuzminski <marcin@python-works.com>
parents:
547
diff
changeset
|
489 |
1279
cb216757a62d
#179 Added followers page
Marcin Kuzminski <marcin@python-works.com>
parents:
1271
diff
changeset
|
490 #========================================================================== |
cb216757a62d
#179 Added followers page
Marcin Kuzminski <marcin@python-works.com>
parents:
1271
diff
changeset
|
491 # REPOSITORY ROUTES |
cb216757a62d
#179 Added followers page
Marcin Kuzminski <marcin@python-works.com>
parents:
1271
diff
changeset
|
492 #========================================================================== |
2692
1f75b23c3e26
switched repo_name to non greedy match.
Marcin Kuzminski <marcin@python-works.com>
parents:
2631
diff
changeset
|
493 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
|
494 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
|
495 conditions=dict(function=check_repo)) |
1538
27be8f94c207
implements #226 repo groups available by path
Marcin Kuzminski <marcin@python-works.com>
parents:
1507
diff
changeset
|
496 |
3246
b9ba0d4d3abf
implemented #83 show repo size on summary page
Marcin Kuzminski <marcin@python-works.com>
parents:
3222
diff
changeset
|
497 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
|
498 controller='summary', action='repo_size', |
b9ba0d4d3abf
implemented #83 show repo size on summary page
Marcin Kuzminski <marcin@python-works.com>
parents:
3222
diff
changeset
|
499 conditions=dict(function=check_repo)) |
b9ba0d4d3abf
implemented #83 show repo size on summary page
Marcin Kuzminski <marcin@python-works.com>
parents:
3222
diff
changeset
|
500 |
1538
27be8f94c207
implements #226 repo groups available by path
Marcin Kuzminski <marcin@python-works.com>
parents:
1507
diff
changeset
|
501 rmap.connect('repos_group_home', '/{group_name:.*}', |
27be8f94c207
implements #226 repo groups available by path
Marcin Kuzminski <marcin@python-works.com>
parents:
1507
diff
changeset
|
502 controller='admin/repos_groups', action="show_by_name", |
27be8f94c207
implements #226 repo groups available by path
Marcin Kuzminski <marcin@python-works.com>
parents:
1507
diff
changeset
|
503 conditions=dict(function=check_group)) |
27be8f94c207
implements #226 repo groups available by path
Marcin Kuzminski <marcin@python-works.com>
parents:
1507
diff
changeset
|
504 |
2692
1f75b23c3e26
switched repo_name to non greedy match.
Marcin Kuzminski <marcin@python-works.com>
parents:
2631
diff
changeset
|
505 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
|
506 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
|
507 conditions=dict(function=check_repo)) |
1211 | 508 |
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
|
509 # no longer user, but kept for routes to work |
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
|
510 rmap.connect("_edit_repo", "/{repo_name:.*?}/edit", |
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
|
511 controller='admin/repos', action="edit", |
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
|
512 conditions=dict(method=["GET"], function=check_repo) |
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
|
513 ) |
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
|
514 |
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
|
515 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
|
516 controller='admin/repos', action="edit", |
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
|
517 conditions=dict(method=["GET"], function=check_repo) |
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
|
518 ) |
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
|
519 |
2996
ebe3e388bbb3
new patch function, and urls schema.
Marcin Kuzminski <marcin@python-works.com>
parents:
2971
diff
changeset
|
520 #still working url for backward compat. |
ebe3e388bbb3
new patch function, and urls schema.
Marcin Kuzminski <marcin@python-works.com>
parents:
2971
diff
changeset
|
521 rmap.connect('raw_changeset_home_depraced', |
ebe3e388bbb3
new patch function, and urls schema.
Marcin Kuzminski <marcin@python-works.com>
parents:
2971
diff
changeset
|
522 '/{repo_name:.*?}/raw-changeset/{revision}', |
ebe3e388bbb3
new patch function, and urls schema.
Marcin Kuzminski <marcin@python-works.com>
parents:
2971
diff
changeset
|
523 controller='changeset', action='changeset_raw', |
ebe3e388bbb3
new patch function, and urls schema.
Marcin Kuzminski <marcin@python-works.com>
parents:
2971
diff
changeset
|
524 revision='tip', conditions=dict(function=check_repo)) |
ebe3e388bbb3
new patch function, and urls schema.
Marcin Kuzminski <marcin@python-works.com>
parents:
2971
diff
changeset
|
525 |
ebe3e388bbb3
new patch function, and urls schema.
Marcin Kuzminski <marcin@python-works.com>
parents:
2971
diff
changeset
|
526 ## new URLs |
ebe3e388bbb3
new patch function, and urls schema.
Marcin Kuzminski <marcin@python-works.com>
parents:
2971
diff
changeset
|
527 rmap.connect('changeset_raw_home', |
ebe3e388bbb3
new patch function, and urls schema.
Marcin Kuzminski <marcin@python-works.com>
parents:
2971
diff
changeset
|
528 '/{repo_name:.*?}/changeset-diff/{revision}', |
ebe3e388bbb3
new patch function, and urls schema.
Marcin Kuzminski <marcin@python-works.com>
parents:
2971
diff
changeset
|
529 controller='changeset', action='changeset_raw', |
ebe3e388bbb3
new patch function, and urls schema.
Marcin Kuzminski <marcin@python-works.com>
parents:
2971
diff
changeset
|
530 revision='tip', conditions=dict(function=check_repo)) |
ebe3e388bbb3
new patch function, and urls schema.
Marcin Kuzminski <marcin@python-works.com>
parents:
2971
diff
changeset
|
531 |
ebe3e388bbb3
new patch function, and urls schema.
Marcin Kuzminski <marcin@python-works.com>
parents:
2971
diff
changeset
|
532 rmap.connect('changeset_patch_home', |
ebe3e388bbb3
new patch function, and urls schema.
Marcin Kuzminski <marcin@python-works.com>
parents:
2971
diff
changeset
|
533 '/{repo_name:.*?}/changeset-patch/{revision}', |
ebe3e388bbb3
new patch function, and urls schema.
Marcin Kuzminski <marcin@python-works.com>
parents:
2971
diff
changeset
|
534 controller='changeset', action='changeset_patch', |
ebe3e388bbb3
new patch function, and urls schema.
Marcin Kuzminski <marcin@python-works.com>
parents:
2971
diff
changeset
|
535 revision='tip', conditions=dict(function=check_repo)) |
ebe3e388bbb3
new patch function, and urls schema.
Marcin Kuzminski <marcin@python-works.com>
parents:
2971
diff
changeset
|
536 |
ebe3e388bbb3
new patch function, and urls schema.
Marcin Kuzminski <marcin@python-works.com>
parents:
2971
diff
changeset
|
537 rmap.connect('changeset_download_home', |
ebe3e388bbb3
new patch function, and urls schema.
Marcin Kuzminski <marcin@python-works.com>
parents:
2971
diff
changeset
|
538 '/{repo_name:.*?}/changeset-download/{revision}', |
ebe3e388bbb3
new patch function, and urls schema.
Marcin Kuzminski <marcin@python-works.com>
parents:
2971
diff
changeset
|
539 controller='changeset', action='changeset_download', |
ebe3e388bbb3
new patch function, and urls schema.
Marcin Kuzminski <marcin@python-works.com>
parents:
2971
diff
changeset
|
540 revision='tip', conditions=dict(function=check_repo)) |
ebe3e388bbb3
new patch function, and urls schema.
Marcin Kuzminski <marcin@python-works.com>
parents:
2971
diff
changeset
|
541 |
1982
87f0800abc7b
#227 Initial version of repository groups permissions system
Marcin Kuzminski <marcin@python-works.com>
parents:
1818
diff
changeset
|
542 rmap.connect('changeset_comment', |
2692
1f75b23c3e26
switched repo_name to non greedy match.
Marcin Kuzminski <marcin@python-works.com>
parents:
2631
diff
changeset
|
543 '/{repo_name:.*?}/changeset/{revision}/comment', |
1670
d2de0c2f02cd
#77 code review
Marcin Kuzminski <marcin@python-works.com>
parents:
1608
diff
changeset
|
544 controller='changeset', revision='tip', action='comment', |
d2de0c2f02cd
#77 code review
Marcin Kuzminski <marcin@python-works.com>
parents:
1608
diff
changeset
|
545 conditions=dict(function=check_repo)) |
d2de0c2f02cd
#77 code review
Marcin Kuzminski <marcin@python-works.com>
parents:
1608
diff
changeset
|
546 |
3695
45df84d36b44
Implemented preview for comments
Marcin Kuzminski <marcin@python-works.com>
parents:
3659
diff
changeset
|
547 rmap.connect('changeset_comment_preview', |
45df84d36b44
Implemented preview for comments
Marcin Kuzminski <marcin@python-works.com>
parents:
3659
diff
changeset
|
548 '/{repo_name:.*?}/changeset/comment/preview', |
45df84d36b44
Implemented preview for comments
Marcin Kuzminski <marcin@python-works.com>
parents:
3659
diff
changeset
|
549 controller='changeset', action='preview_comment', |
45df84d36b44
Implemented preview for comments
Marcin Kuzminski <marcin@python-works.com>
parents:
3659
diff
changeset
|
550 conditions=dict(function=check_repo, method=["POST"])) |
45df84d36b44
Implemented preview for comments
Marcin Kuzminski <marcin@python-works.com>
parents:
3659
diff
changeset
|
551 |
1982
87f0800abc7b
#227 Initial version of repository groups permissions system
Marcin Kuzminski <marcin@python-works.com>
parents:
1818
diff
changeset
|
552 rmap.connect('changeset_comment_delete', |
2692
1f75b23c3e26
switched repo_name to non greedy match.
Marcin Kuzminski <marcin@python-works.com>
parents:
2631
diff
changeset
|
553 '/{repo_name:.*?}/changeset/comment/{comment_id}/delete', |
1670
d2de0c2f02cd
#77 code review
Marcin Kuzminski <marcin@python-works.com>
parents:
1608
diff
changeset
|
554 controller='changeset', action='delete_comment', |
1712
cac5109ac3b6
Notification system improvements
Marcin Kuzminski <marcin@python-works.com>
parents:
1702
diff
changeset
|
555 conditions=dict(function=check_repo, method=["DELETE"])) |
1670
d2de0c2f02cd
#77 code review
Marcin Kuzminski <marcin@python-works.com>
parents:
1608
diff
changeset
|
556 |
2971
2bfcec6a3985
new tooltip implementation
Marcin Kuzminski <marcin@python-works.com>
parents:
2951
diff
changeset
|
557 rmap.connect('changeset_info', '/changeset_info/{repo_name:.*?}/{revision}', |
2bfcec6a3985
new tooltip implementation
Marcin Kuzminski <marcin@python-works.com>
parents:
2951
diff
changeset
|
558 controller='changeset', action='changeset_info') |
2bfcec6a3985
new tooltip implementation
Marcin Kuzminski <marcin@python-works.com>
parents:
2951
diff
changeset
|
559 |
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
|
560 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
|
561 '/{repo_name:.*?}/compare/{org_ref_type}@{org_ref:.*?}...{other_ref_type}@{other_ref:.*?}', |
2241
b2a2868d7bec
Basic compare-view controller with ref parsing
Marcin Kuzminski <marcin@python-works.com>
parents:
2177
diff
changeset
|
562 controller='compare', action='index', |
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
|
563 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
|
564 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
|
565 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
|
566 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
|
567 ) |
2241
b2a2868d7bec
Basic compare-view controller with ref parsing
Marcin Kuzminski <marcin@python-works.com>
parents:
2177
diff
changeset
|
568 |
2244
77e376fdc4c6
pull requests draft UI
Marcin Kuzminski <marcin@python-works.com>
parents:
2241
diff
changeset
|
569 rmap.connect('pullrequest_home', |
2692
1f75b23c3e26
switched repo_name to non greedy match.
Marcin Kuzminski <marcin@python-works.com>
parents:
2631
diff
changeset
|
570 '/{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
|
571 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
|
572 method=["GET"])) |
f29469677319
Added basic models for saving open pull requests
Marcin Kuzminski <marcin@python-works.com>
parents:
2430
diff
changeset
|
573 |
f29469677319
Added basic models for saving open pull requests
Marcin Kuzminski <marcin@python-works.com>
parents:
2430
diff
changeset
|
574 rmap.connect('pullrequest', |
2692
1f75b23c3e26
switched repo_name to non greedy match.
Marcin Kuzminski <marcin@python-works.com>
parents:
2631
diff
changeset
|
575 '/{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
|
576 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
|
577 method=["POST"])) |
f29469677319
Added basic models for saving open pull requests
Marcin Kuzminski <marcin@python-works.com>
parents:
2430
diff
changeset
|
578 |
f29469677319
Added basic models for saving open pull requests
Marcin Kuzminski <marcin@python-works.com>
parents:
2430
diff
changeset
|
579 rmap.connect('pullrequest_show', |
2692
1f75b23c3e26
switched repo_name to non greedy match.
Marcin Kuzminski <marcin@python-works.com>
parents:
2631
diff
changeset
|
580 '/{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
|
581 controller='pullrequests', |
f29469677319
Added basic models for saving open pull requests
Marcin Kuzminski <marcin@python-works.com>
parents:
2430
diff
changeset
|
582 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
|
583 method=["GET"])) |
2614
3f50a5e8fc4d
Added editing of pull-request reviewers.
Marcin Kuzminski <marcin@python-works.com>
parents:
2489
diff
changeset
|
584 rmap.connect('pullrequest_update', |
2692
1f75b23c3e26
switched repo_name to non greedy match.
Marcin Kuzminski <marcin@python-works.com>
parents:
2631
diff
changeset
|
585 '/{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
|
586 controller='pullrequests', |
3f50a5e8fc4d
Added editing of pull-request reviewers.
Marcin Kuzminski <marcin@python-works.com>
parents:
2489
diff
changeset
|
587 action='update', conditions=dict(function=check_repo, |
3f50a5e8fc4d
Added editing of pull-request reviewers.
Marcin Kuzminski <marcin@python-works.com>
parents:
2489
diff
changeset
|
588 method=["PUT"])) |
2746
49a4864b11c1
Authors of pull-requests can now delete them
Marcin Kuzminski <marcin@python-works.com>
parents:
2726
diff
changeset
|
589 rmap.connect('pullrequest_delete', |
49a4864b11c1
Authors of pull-requests can now delete them
Marcin Kuzminski <marcin@python-works.com>
parents:
2726
diff
changeset
|
590 '/{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
|
591 controller='pullrequests', |
49a4864b11c1
Authors of pull-requests can now delete them
Marcin Kuzminski <marcin@python-works.com>
parents:
2726
diff
changeset
|
592 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
|
593 method=["DELETE"])) |
2244
77e376fdc4c6
pull requests draft UI
Marcin Kuzminski <marcin@python-works.com>
parents:
2241
diff
changeset
|
594 |
2440
1bc579bcd67a
- pull request generates overview based on it's params
Marcin Kuzminski <marcin@python-works.com>
parents:
2434
diff
changeset
|
595 rmap.connect('pullrequest_show_all', |
2692
1f75b23c3e26
switched repo_name to non greedy match.
Marcin Kuzminski <marcin@python-works.com>
parents:
2631
diff
changeset
|
596 '/{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
|
597 controller='pullrequests', |
1bc579bcd67a
- pull request generates overview based on it's params
Marcin Kuzminski <marcin@python-works.com>
parents:
2434
diff
changeset
|
598 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
|
599 method=["GET"])) |
1bc579bcd67a
- pull request generates overview based on it's params
Marcin Kuzminski <marcin@python-works.com>
parents:
2434
diff
changeset
|
600 |
2443
fd0a822481ec
- added commenting to pull requests
Marcin Kuzminski <marcin@python-works.com>
parents:
2440
diff
changeset
|
601 rmap.connect('pullrequest_comment', |
2692
1f75b23c3e26
switched repo_name to non greedy match.
Marcin Kuzminski <marcin@python-works.com>
parents:
2631
diff
changeset
|
602 '/{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
|
603 controller='pullrequests', |
fd0a822481ec
- added commenting to pull requests
Marcin Kuzminski <marcin@python-works.com>
parents:
2440
diff
changeset
|
604 action='comment', conditions=dict(function=check_repo, |
fd0a822481ec
- added commenting to pull requests
Marcin Kuzminski <marcin@python-works.com>
parents:
2440
diff
changeset
|
605 method=["POST"])) |
fd0a822481ec
- added commenting to pull requests
Marcin Kuzminski <marcin@python-works.com>
parents:
2440
diff
changeset
|
606 |
2489
a0adf8db1416
Enabled inline comments in pull-requests
Marcin Kuzminski <marcin@python-works.com>
parents:
2443
diff
changeset
|
607 rmap.connect('pullrequest_comment_delete', |
2692
1f75b23c3e26
switched repo_name to non greedy match.
Marcin Kuzminski <marcin@python-works.com>
parents:
2631
diff
changeset
|
608 '/{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
|
609 controller='pullrequests', action='delete_comment', |
a0adf8db1416
Enabled inline comments in pull-requests
Marcin Kuzminski <marcin@python-works.com>
parents:
2443
diff
changeset
|
610 conditions=dict(function=check_repo, method=["DELETE"])) |
a0adf8db1416
Enabled inline comments in pull-requests
Marcin Kuzminski <marcin@python-works.com>
parents:
2443
diff
changeset
|
611 |
3283
a34b98423de7
summary: don't link explicitly to /summary
Mads Kiilerich <madski@unity3d.com>
parents:
3246
diff
changeset
|
612 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
|
613 controller='summary', conditions=dict(function=check_repo)) |
1211 | 614 |
2692
1f75b23c3e26
switched repo_name to non greedy match.
Marcin Kuzminski <marcin@python-works.com>
parents:
2631
diff
changeset
|
615 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
|
616 controller='branches', conditions=dict(function=check_repo)) |
1211 | 617 |
2692
1f75b23c3e26
switched repo_name to non greedy match.
Marcin Kuzminski <marcin@python-works.com>
parents:
2631
diff
changeset
|
618 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
|
619 controller='tags', conditions=dict(function=check_repo)) |
1211 | 620 |
2692
1f75b23c3e26
switched repo_name to non greedy match.
Marcin Kuzminski <marcin@python-works.com>
parents:
2631
diff
changeset
|
621 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
|
622 controller='bookmarks', conditions=dict(function=check_repo)) |
a3ee2611e6e8
implements #135 bookmark support for UI
Marcin Kuzminski <marcin@python-works.com>
parents:
1722
diff
changeset
|
623 |
2692
1f75b23c3e26
switched repo_name to non greedy match.
Marcin Kuzminski <marcin@python-works.com>
parents:
2631
diff
changeset
|
624 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
|
625 controller='changelog', conditions=dict(function=check_repo)) |
1211 | 626 |
3764
c7970889c5c0
Removed shortlog aka lightweight changelog.
Marcin Kuzminski <marcin@python-works.com>
parents:
3760
diff
changeset
|
627 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
|
628 controller='changelog', action='changelog_summary', |
c7970889c5c0
Removed shortlog aka lightweight changelog.
Marcin Kuzminski <marcin@python-works.com>
parents:
3760
diff
changeset
|
629 conditions=dict(function=check_repo)) |
c7970889c5c0
Removed shortlog aka lightweight changelog.
Marcin Kuzminski <marcin@python-works.com>
parents:
3760
diff
changeset
|
630 |
3760
6302a1423a4e
Use changelog controller for displaying history of files.
Marcin Kuzminski <marcin@python-works.com>
parents:
3734
diff
changeset
|
631 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
|
632 controller='changelog', f_path=None, |
6302a1423a4e
Use changelog controller for displaying history of files.
Marcin Kuzminski <marcin@python-works.com>
parents:
3734
diff
changeset
|
633 conditions=dict(function=check_repo)) |
6302a1423a4e
Use changelog controller for displaying history of files.
Marcin Kuzminski <marcin@python-works.com>
parents:
3734
diff
changeset
|
634 |
2692
1f75b23c3e26
switched repo_name to non greedy match.
Marcin Kuzminski <marcin@python-works.com>
parents:
2631
diff
changeset
|
635 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
|
636 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
|
637 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
|
638 |
2692
1f75b23c3e26
switched repo_name to non greedy match.
Marcin Kuzminski <marcin@python-works.com>
parents:
2631
diff
changeset
|
639 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
|
640 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
|
641 conditions=dict(function=check_repo)) |
1211 | 642 |
3576
c177f304eb40
files: accept URLs with no path and no slash after the revision
Mads Kiilerich <madski@unity3d.com>
parents:
3458
diff
changeset
|
643 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
|
644 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
|
645 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
|
646 |
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
|
647 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
|
648 '/{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
|
649 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
|
650 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
|
651 |
2692
1f75b23c3e26
switched repo_name to non greedy match.
Marcin Kuzminski <marcin@python-works.com>
parents:
2631
diff
changeset
|
652 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
|
653 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
|
654 conditions=dict(function=check_repo)) |
1211 | 655 |
656 rmap.connect('files_rawfile_home', | |
2692
1f75b23c3e26
switched repo_name to non greedy match.
Marcin Kuzminski <marcin@python-works.com>
parents:
2631
diff
changeset
|
657 '/{repo_name:.*?}/rawfile/{revision}/{f_path:.*}', |
1211 | 658 controller='files', action='rawfile', revision='tip', |
659 f_path='', conditions=dict(function=check_repo)) | |
660 | |
661 rmap.connect('files_raw_home', | |
2692
1f75b23c3e26
switched repo_name to non greedy match.
Marcin Kuzminski <marcin@python-works.com>
parents:
2631
diff
changeset
|
662 '/{repo_name:.*?}/raw/{revision}/{f_path:.*}', |
1211 | 663 controller='files', action='raw', revision='tip', f_path='', |
664 conditions=dict(function=check_repo)) | |
665 | |
666 rmap.connect('files_annotate_home', | |
2692
1f75b23c3e26
switched repo_name to non greedy match.
Marcin Kuzminski <marcin@python-works.com>
parents:
2631
diff
changeset
|
667 '/{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
|
668 controller='files', action='index', revision='tip', |
ee07357d9265
unified annotation view with file source view
Marcin Kuzminski <marcin@python-works.com>
parents:
1982
diff
changeset
|
669 f_path='', annotate=True, conditions=dict(function=check_repo)) |
1211 | 670 |
1305
166317d464f3
Added server side file editing with commit
Marcin Kuzminski <marcin@python-works.com>
parents:
1301
diff
changeset
|
671 rmap.connect('files_edit_home', |
2692
1f75b23c3e26
switched repo_name to non greedy match.
Marcin Kuzminski <marcin@python-works.com>
parents:
2631
diff
changeset
|
672 '/{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
|
673 controller='files', action='edit', revision='tip', |
166317d464f3
Added server side file editing with commit
Marcin Kuzminski <marcin@python-works.com>
parents:
1301
diff
changeset
|
674 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
|
675 |
1483
7b67b0dcad6d
Added initial support for creating new nodes in repos
Marcin Kuzminski <marcin@python-works.com>
parents:
1452
diff
changeset
|
676 rmap.connect('files_add_home', |
2692
1f75b23c3e26
switched repo_name to non greedy match.
Marcin Kuzminski <marcin@python-works.com>
parents:
2631
diff
changeset
|
677 '/{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
|
678 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
|
679 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
|
680 |
2692
1f75b23c3e26
switched repo_name to non greedy match.
Marcin Kuzminski <marcin@python-works.com>
parents:
2631
diff
changeset
|
681 rmap.connect('files_archive_home', '/{repo_name:.*?}/archive/{fname}', |
872
b956e6f415a2
implemented #91,
Marcin Kuzminski <marcin@python-works.com>
parents:
769
diff
changeset
|
682 controller='files', action='archivefile', |
604
5cc96df705b9
fixed @repo into :repo for docs
Marcin Kuzminski <marcin@python-works.com>
parents:
547
diff
changeset
|
683 conditions=dict(function=check_repo)) |
1211 | 684 |
1452
8585fbf3ed06
Implemented #111 copy github node finder solution
Marcin Kuzminski <marcin@python-works.com>
parents:
1445
diff
changeset
|
685 rmap.connect('files_nodelist_home', |
2692
1f75b23c3e26
switched repo_name to non greedy match.
Marcin Kuzminski <marcin@python-works.com>
parents:
2631
diff
changeset
|
686 '/{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
|
687 controller='files', action='nodelist', |
8585fbf3ed06
Implemented #111 copy github node finder solution
Marcin Kuzminski <marcin@python-works.com>
parents:
1445
diff
changeset
|
688 conditions=dict(function=check_repo)) |
8585fbf3ed06
Implemented #111 copy github node finder solution
Marcin Kuzminski <marcin@python-works.com>
parents:
1445
diff
changeset
|
689 |
2692
1f75b23c3e26
switched repo_name to non greedy match.
Marcin Kuzminski <marcin@python-works.com>
parents:
2631
diff
changeset
|
690 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
|
691 controller='forks', action='fork_create', |
530
a08f610e545e
Implemented server side forks
Marcin Kuzminski <marcin@python-works.com>
parents:
525
diff
changeset
|
692 conditions=dict(function=check_repo, method=["POST"])) |
1211 | 693 |
2692
1f75b23c3e26
switched repo_name to non greedy match.
Marcin Kuzminski <marcin@python-works.com>
parents:
2631
diff
changeset
|
694 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
|
695 controller='forks', action='fork', |
530
a08f610e545e
Implemented server side forks
Marcin Kuzminski <marcin@python-works.com>
parents:
525
diff
changeset
|
696 conditions=dict(function=check_repo)) |
604
5cc96df705b9
fixed @repo into :repo for docs
Marcin Kuzminski <marcin@python-works.com>
parents:
547
diff
changeset
|
697 |
2692
1f75b23c3e26
switched repo_name to non greedy match.
Marcin Kuzminski <marcin@python-works.com>
parents:
2631
diff
changeset
|
698 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
|
699 controller='forks', action='forks', |
e7eef7a1db6a
#235 forking page repo group selection
Marcin Kuzminski <marcin@python-works.com>
parents:
1712
diff
changeset
|
700 conditions=dict(function=check_repo)) |
e7eef7a1db6a
#235 forking page repo group selection
Marcin Kuzminski <marcin@python-works.com>
parents:
1712
diff
changeset
|
701 |
2692
1f75b23c3e26
switched repo_name to non greedy match.
Marcin Kuzminski <marcin@python-works.com>
parents:
2631
diff
changeset
|
702 rmap.connect('repo_followers_home', '/{repo_name:.*?}/followers', |
1279
cb216757a62d
#179 Added followers page
Marcin Kuzminski <marcin@python-works.com>
parents:
1271
diff
changeset
|
703 controller='followers', action='followers', |
cb216757a62d
#179 Added followers page
Marcin Kuzminski <marcin@python-works.com>
parents:
1271
diff
changeset
|
704 conditions=dict(function=check_repo)) |
1301
7e75af301842
Added simple forks page, resolves issue #179
Marcin Kuzminski <marcin@python-works.com>
parents:
1279
diff
changeset
|
705 |
1211 | 706 return rmap |