diff options
author | Filipa Lacerda <filipa@gitlab.com> | 2016-12-22 10:15:49 +0000 |
---|---|---|
committer | Filipa Lacerda <filipa@gitlab.com> | 2016-12-22 10:15:49 +0000 |
commit | 7fc64dd18d9b2b6e3a2a01dab0007f7dd25c37ed (patch) | |
tree | 428602d5265cd981a2e33ace8aed6fc9594dd37c /lib/api | |
parent | fd3ab00cf90ddf081c61fb701721ca9180378bba (diff) | |
parent | 6d9c1d3efce00da95832feaaf36227bcbffecadf (diff) | |
download | gitlab-ce-pipeline-ui-updates.tar.gz |
Merge branch 'master' into pipeline-ui-updatespipeline-ui-updates
* master: (259 commits)
Exclude non existent repository storages.
fixed minor animation glitch in mini pipeline graph animation
Update Bitbucket callback URL documentation
Update build step for KaTeX.
Add KaTeX fonts to assets paths and precompile
Replace url('...') to url(font-path('...'))
Rname katex.css to katex.scss
Revert conflicting EE changes
Added Autodeploy script for OpenShift
Whitelist next project names: notes, services
Put back progress bar CSS
Remove unneeded bundle refs.
Adds entry to changelog
Reduce MR widget title by one pixel
Use same font size for all items in issue title
Adds background color for disabled state to merge when succeeds dropdown
Filter protocol-relative URLs in ExternalLinkFilter. Fixes issue #22742.
Move javascript for widget check to ci_bundle.
Introduce "Set up autodeploy" button to help configure GitLab CI for deployment
Whitelist next project names: help, ci, admin, search
...
Diffstat (limited to 'lib/api')
-rw-r--r-- | lib/api/files.rb | 2 | ||||
-rw-r--r-- | lib/api/repositories.rb | 6 | ||||
-rw-r--r-- | lib/api/services.rb | 13 | ||||
-rw-r--r-- | lib/api/users.rb | 2 |
4 files changed, 11 insertions, 12 deletions
diff --git a/lib/api/files.rb b/lib/api/files.rb index 28f306e45f3..532a317c89e 100644 --- a/lib/api/files.rb +++ b/lib/api/files.rb @@ -1,8 +1,6 @@ module API # Projects API class Files < Grape::API - before { authenticate! } - helpers do def commit_params(attrs) { diff --git a/lib/api/repositories.rb b/lib/api/repositories.rb index c287ee34a68..4ca6646a6f1 100644 --- a/lib/api/repositories.rb +++ b/lib/api/repositories.rb @@ -2,7 +2,6 @@ require 'mime/types' module API class Repositories < Grape::API - before { authenticate! } before { authorize! :download_code, user_project } params do @@ -79,8 +78,6 @@ module API optional :format, type: String, desc: 'The archive format' end get ':id/repository/archive', requirements: { format: Gitlab::Regex.archive_formats_regex } do - authorize! :download_code, user_project - begin send_git_archive user_project.repository, ref: params[:sha], format: params[:format] rescue @@ -96,7 +93,6 @@ module API requires :to, type: String, desc: 'The commit, branch name, or tag name to stop comparison' end get ':id/repository/compare' do - authorize! :download_code, user_project compare = Gitlab::Git::Compare.new(user_project.repository.raw_repository, params[:from], params[:to]) present compare, with: Entities::Compare end @@ -105,8 +101,6 @@ module API success Entities::Contributor end get ':id/repository/contributors' do - authorize! :download_code, user_project - begin present user_project.repository.contributors, with: Entities::Contributor diff --git a/lib/api/services.rb b/lib/api/services.rb index 59232c84c24..d11cdce4e18 100644 --- a/lib/api/services.rb +++ b/lib/api/services.rb @@ -378,7 +378,6 @@ module API desc: 'A custom certificate authority bundle to verify the Kubernetes cluster with (PEM format)' }, ], - 'mattermost-slash-commands' => [ { required: true, @@ -387,6 +386,14 @@ module API desc: 'The Mattermost token' } ], + 'slack-slash-commands' => [ + { + required: true, + name: :token, + type: String, + desc: 'The Slack token' + } + ], 'pipelines-email' => [ { required: true, @@ -473,7 +480,7 @@ module API desc: 'The description of the tracker' } ], - 'slack-notification' => [ + 'slack' => [ { required: true, name: :webhook, @@ -493,7 +500,7 @@ module API desc: 'The channel name' } ], - 'mattermost-notification' => [ + 'mattermost' => [ { required: true, name: :webhook, diff --git a/lib/api/users.rb b/lib/api/users.rb index 0842c3874c5..4c22287b5c6 100644 --- a/lib/api/users.rb +++ b/lib/api/users.rb @@ -94,7 +94,7 @@ module API identity_attrs = params.slice(:provider, :extern_uid) confirm = params.delete(:confirm) - user = User.build_user(declared_params(include_missing: false)) + user = User.new(declared_params(include_missing: false)) user.skip_confirmation! unless confirm if identity_attrs.any? |