diff options
author | Douglas Barbosa Alexandre <dbalexandre@gmail.com> | 2015-11-02 14:03:42 -0200 |
---|---|---|
committer | Douglas Barbosa Alexandre <dbalexandre@gmail.com> | 2015-11-02 14:03:42 -0200 |
commit | 93672c502010787be9102b25a4f93722526968b9 (patch) | |
tree | b623928acce8b9f6b052f830b44f0ab0d5d1c6f4 /app/controllers/snippets_controller.rb | |
parent | c8fe42151291593f0f43509a70235c46fce169a1 (diff) | |
download | gitlab-ce-93672c502010787be9102b25a4f93722526968b9.tar.gz |
Use `read` rather than `show` like the ability name
Diffstat (limited to 'app/controllers/snippets_controller.rb')
-rw-r--r-- | app/controllers/snippets_controller.rb | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/app/controllers/snippets_controller.rb b/app/controllers/snippets_controller.rb index 8498efc89d0..08f2483af33 100644 --- a/app/controllers/snippets_controller.rb +++ b/app/controllers/snippets_controller.rb @@ -2,7 +2,7 @@ class SnippetsController < ApplicationController before_action :snippet, only: [:show, :edit, :destroy, :update, :raw] # Allow read snippet - before_action :authorize_show_snippet!, only: [:show] + before_action :authorize_read_snippet!, only: [:show] # Allow modify snippet before_action :authorize_update_snippet!, only: [:edit, :update] @@ -86,7 +86,7 @@ class SnippetsController < ApplicationController end end - def authorize_show_snippet! + def authorize_read_snippet! authenticate_user! unless can?(current_user, :read_personal_snippet, @snippet) end |