diff options
author | Felipe Artur <felipefac@gmail.com> | 2016-04-13 15:42:33 -0300 |
---|---|---|
committer | Felipe Artur <felipefac@gmail.com> | 2016-04-13 15:42:33 -0300 |
commit | 5395e6175e77d3cd8800bb9f41c09d59934b502f (patch) | |
tree | 2234488f40eb4f7aa6920fbe2ab41b1d6f53e14e /lib/api/helpers.rb | |
parent | 39d853f5bd9492fa8dfc8e07ec11070705d3c879 (diff) | |
parent | c0678f2d281242601560e2646cab1aa8a349c4bb (diff) | |
download | gitlab-ce-issue_3508.tar.gz |
Merge branch 'master' into issue_3508issue_3508
Diffstat (limited to 'lib/api/helpers.rb')
-rw-r--r-- | lib/api/helpers.rb | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/lib/api/helpers.rb b/lib/api/helpers.rb index 4921ae99e78..5bbf721321d 100644 --- a/lib/api/helpers.rb +++ b/lib/api/helpers.rb @@ -91,8 +91,7 @@ module API if can?(current_user, :read_group, group) group else - forbidden!("#{current_user.username} lacks sufficient "\ - "access to #{group.name}") + not_found!('Group') end end @@ -241,6 +240,10 @@ module API render_api_error!('413 Request Entity Too Large', 413) end + def not_modified! + render_api_error!('304 Not Modified', 304) + end + def render_validation_error!(model) if model.errors.any? render_api_error!(model.errors.messages || '400 Bad Request', 400) |