##// END OF EJS Templates
My account pages shouldn't be accessible by anonymous users
marcink -
r2626:4abce2c1 beta
parent child Browse files
Show More
@@ -350,6 +350,7 class SettingsController(BaseController)
350 )
350 )
351 return render('admin/users/user_edit_my_account.html')
351 return render('admin/users/user_edit_my_account.html')
352
352
353 @NotAnonymous()
353 def my_account_update(self):
354 def my_account_update(self):
354 """PUT /_admin/my_account_update: Update an existing item"""
355 """PUT /_admin/my_account_update: Update an existing item"""
355 # Forms posted to this method should contain a hidden field:
356 # Forms posted to this method should contain a hidden field:
@@ -385,7 +386,8 class SettingsController(BaseController)
385 % form_result.get('username'), category='error')
386 % form_result.get('username'), category='error')
386
387
387 return redirect(url('my_account'))
388 return redirect(url('my_account'))
388
389
390 @NotAnonymous()
389 def my_account_my_repos(self):
391 def my_account_my_repos(self):
390 all_repos = self.sa.query(Repository)\
392 all_repos = self.sa.query(Repository)\
391 .filter(Repository.user_id == self.rhodecode_user.user_id)\
393 .filter(Repository.user_id == self.rhodecode_user.user_id)\
@@ -394,6 +396,7 class SettingsController(BaseController)
394 c.user_repos = ScmModel().get_repos(all_repos)
396 c.user_repos = ScmModel().get_repos(all_repos)
395 return render('admin/users/user_edit_my_account_repos.html')
397 return render('admin/users/user_edit_my_account_repos.html')
396
398
399 @NotAnonymous()
397 def my_account_my_pullrequests(self):
400 def my_account_my_pullrequests(self):
398 c.my_pull_requests = PullRequest.query()\
401 c.my_pull_requests = PullRequest.query()\
399 .filter(PullRequest.user_id==
402 .filter(PullRequest.user_id==
@@ -420,6 +423,7 class SettingsController(BaseController)
420
423
421 return render('admin/repos/repo_add_create_repository.html')
424 return render('admin/repos/repo_add_create_repository.html')
422
425
426 @NotAnonymous()
423 def get_hg_ui_settings(self):
427 def get_hg_ui_settings(self):
424 ret = self.sa.query(RhodeCodeUi).all()
428 ret = self.sa.query(RhodeCodeUi).all()
425
429
General Comments 0
You need to be logged in to leave comments. Login now