diff options
author | Rubén Dávila <ruben@gitlab.com> | 2018-01-03 00:22:01 -0500 |
---|---|---|
committer | Rubén Dávila <ruben@gitlab.com> | 2018-01-03 00:22:01 -0500 |
commit | cf8f09636b766c2df2ff48c078c0d8a6657bf4dd (patch) | |
tree | d06b83275b6bd2f4aeb9f805bd842ef7dbefac2f /lib/api | |
parent | ff077cf7dc5cfd7c6c6206d801ea3f326f7af1aa (diff) | |
download | gitlab-ce-cf8f09636b766c2df2ff48c078c0d8a6657bf4dd.tar.gz |
Fix API endpoints to edit wiki pages where project belongs to a grouprd-api-request-to-edit-wiki-page-fails-when-project-belongs-to-group
In some cases is prefered to manually create a ProjectWiki over using
Project#wiki. This is because Project#wiki always uses the #owner (which
is a User sometimes) as the
author of the wiki changes but sometimes the owner is a Group and it
doesn't respond to #username
Diffstat (limited to 'lib/api')
-rw-r--r-- | lib/api/helpers.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/api/helpers.rb b/lib/api/helpers.rb index 9ba15893f55..8ad4b2ecbf3 100644 --- a/lib/api/helpers.rb +++ b/lib/api/helpers.rb @@ -69,7 +69,7 @@ module API end def wiki_page - page = user_project.wiki.find_page(params[:slug]) + page = ProjectWiki.new(user_project, current_user).find_page(params[:slug]) page || not_found!('Wiki Page') end |