Commit graph

7 commits

Author SHA1 Message Date
Dmitriy Zaporozhets
342d553709
Rename abilities to correspond contoller/model action names
write_ was renamed to create_
modify_  was renamed to update_

So now in update action we have next code

def create
  can?(current_user, :create_issue, @issue)
end

def update
  can?(current_user, :update_issue, @issue)
end

Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
2015-06-26 15:55:56 +02:00
Vinnie Okada
9623b71a39 More restricted visibility changes
Bug fixes and new tests for the restricted visibility changes.
2015-03-10 18:36:43 -06:00
Vinnie Okada
928fc94c3d Enforce restricted visibilities for snippets
Add new service classes to create and update project and personal
snippets.  These classes are responsible for enforcing restricted
visibility settings for non-admin users.
2015-03-08 17:57:08 -06:00
jubianchi
998cd3cb63 Improve error reporting on users API
* users (#6878, #3526, #4209): Validation error messages are now exposed through 400 responses, 409 response are sent in case of duplicate email or username
* MRs (#5335): 409 responses are sent in case of duplicate merge request (source/target branches), 422 responses are sent when submiting MR fo/from unrelated forks
* issues
* labels
* projects
2014-09-16 01:25:24 +02:00
Jeroen van Baarsen
ef404d8ea6 Dropped expiration date from the snippet API 2014-01-11 18:40:17 +01:00
Dmitriy Zaporozhets
883f465abe Fix snippet raw content being escaped 2013-06-06 16:10:24 +03:00
Dmitriy Zaporozhets
b05600f28b Split Project api on several parts: deploy_keys, hooks, snippets etc 2013-06-06 12:37:51 +03:00