##// END OF EJS Templates
fixed #113 to high permission was required to fork a repository
marcink -
r1054:32dbf759 beta
parent child Browse files
Show More
@@ -47,10 +47,10 b' log = logging.getLogger(__name__)'
47 47 class SettingsController(BaseRepoController):
48 48
49 49 @LoginRequired()
50 @HasRepoPermissionAllDecorator('repository.admin')
51 50 def __before__(self):
52 51 super(SettingsController, self).__before__()
53 52
53 @HasRepoPermissionAllDecorator('repository.admin')
54 54 def index(self, repo_name):
55 55 repo_model = RepoModel()
56 56 c.repo_info = repo = repo_model.get_by_repo_name(repo_name)
@@ -93,6 +93,7 b' class SettingsController(BaseRepoControl'
93 93 force_defaults=False
94 94 )
95 95
96 @HasRepoPermissionAllDecorator('repository.admin')
96 97 def update(self, repo_name):
97 98 repo_model = RepoModel()
98 99 changed_name = repo_name
@@ -124,7 +125,7 b' class SettingsController(BaseRepoControl'
124 125 return redirect(url('repo_settings_home', repo_name=changed_name))
125 126
126 127
127
128 @HasRepoPermissionAllDecorator('repository.admin')
128 129 def delete(self, repo_name):
129 130 """DELETE /repos/repo_name: Delete an existing item"""
130 131 # Forms posted to this method should contain a hidden field:
@@ -156,6 +157,7 b' class SettingsController(BaseRepoControl'
156 157
157 158 return redirect(url('home'))
158 159
160 @HasRepoPermissionAllDecorator('repository.read')
159 161 def fork(self, repo_name):
160 162 repo_model = RepoModel()
161 163 c.repo_info = repo = repo_model.get_by_repo_name(repo_name)
@@ -171,7 +173,7 b' class SettingsController(BaseRepoControl'
171 173 return render('settings/repo_fork.html')
172 174
173 175
174
176 @HasRepoPermissionAllDecorator('repository.read')
175 177 def fork_create(self, repo_name):
176 178 repo_model = RepoModel()
177 179 c.repo_info = repo_model.get_by_repo_name(repo_name)
@@ -233,8 +233,8 b''
233 233 %else:
234 234 <li>${h.link_to(_('settings'),h.url('repo_settings_home',repo_name=c.repo_name),class_='settings')}</li>
235 235 %endif
236 %endif
236 237 <li>${h.link_to(_('fork'),h.url('repo_fork_home',repo_name=c.repo_name),class_='fork')}</li>
237 %endif
238 238 <li>${h.link_to(_('search'),h.url('search_repo',search_repo=c.repo_name),class_='search')}</li>
239 239
240 240 %if h.HasPermissionAll('hg.admin')('access admin main page'):
General Comments 0
You need to be logged in to leave comments. Login now