mirror of
https://github.com/scinote-eln/scinote-web.git
synced 2025-01-01 13:13:22 +08:00
Renamed before_action for repository edit and destroy action. [fix 1269]
This commit is contained in:
parent
d8d54232c3
commit
f012779780
1 changed files with 3 additions and 3 deletions
|
@ -1,8 +1,8 @@
|
|||
class RepositoriesController < ApplicationController
|
||||
before_action :load_vars
|
||||
before_action :check_view_all_permissions, only: :index
|
||||
before_action :check_edit_permissions, only: %(destroy destroy_modal
|
||||
rename_modal update)
|
||||
before_action :check_edit_and_destroy_permissions, only:
|
||||
%(destroy destroy_modal rename_modal update)
|
||||
|
||||
def index
|
||||
render('repositories/index')
|
||||
|
@ -74,7 +74,7 @@ class RepositoriesController < ApplicationController
|
|||
render_403 unless can_view_team_repositories(@team)
|
||||
end
|
||||
|
||||
def check_edit_permissions
|
||||
def check_edit_and_destroy_permissions
|
||||
render_403 unless can_edit_repository(@repository)
|
||||
end
|
||||
|
||||
|
|
Loading…
Reference in a new issue