Show More
@@ -234,6 +234,15 b' class FilesController(BaseRepoController' | |||||
234 | @LoginRequired() |
|
234 | @LoginRequired() | |
235 | @HasRepoPermissionAnyDecorator('repository.write', 'repository.admin') |
|
235 | @HasRepoPermissionAnyDecorator('repository.write', 'repository.admin') | |
236 | def edit(self, repo_name, revision, f_path): |
|
236 | def edit(self, repo_name, revision, f_path): | |
|
237 | repo = Repository.get_by_repo_name(repo_name) | |||
|
238 | if repo.enable_locking and repo.locked[0]: | |||
|
239 | h.flash(_('This repository is has been locked by %s on %s') | |||
|
240 | % (h.person_by_id(repo.locked[0]), | |||
|
241 | h.fmt_date(h.time_to_datetime(repo.locked[1]))), | |||
|
242 | 'warning') | |||
|
243 | return redirect(h.url('files_home', | |||
|
244 | repo_name=repo_name, revision='tip')) | |||
|
245 | ||||
237 | r_post = request.POST |
|
246 | r_post = request.POST | |
238 |
|
247 | |||
239 | c.cs = self.__get_cs_or_redirect(revision, repo_name) |
|
248 | c.cs = self.__get_cs_or_redirect(revision, repo_name) | |
@@ -284,6 +293,16 b' class FilesController(BaseRepoController' | |||||
284 | @LoginRequired() |
|
293 | @LoginRequired() | |
285 | @HasRepoPermissionAnyDecorator('repository.write', 'repository.admin') |
|
294 | @HasRepoPermissionAnyDecorator('repository.write', 'repository.admin') | |
286 | def add(self, repo_name, revision, f_path): |
|
295 | def add(self, repo_name, revision, f_path): | |
|
296 | ||||
|
297 | repo = Repository.get_by_repo_name(repo_name) | |||
|
298 | if repo.enable_locking and repo.locked[0]: | |||
|
299 | h.flash(_('This repository is has been locked by %s on %s') | |||
|
300 | % (h.person_by_id(repo.locked[0]), | |||
|
301 | h.fmt_date(h.time_to_datetime(repo.locked[1]))), | |||
|
302 | 'warning') | |||
|
303 | return redirect(h.url('files_home', | |||
|
304 | repo_name=repo_name, revision='tip')) | |||
|
305 | ||||
287 | r_post = request.POST |
|
306 | r_post = request.POST | |
288 | c.cs = self.__get_cs_or_redirect(revision, repo_name, |
|
307 | c.cs = self.__get_cs_or_redirect(revision, repo_name, | |
289 | redirect_after=False) |
|
308 | redirect_after=False) |
General Comments 0
You need to be logged in to leave comments.
Login now