Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
1
Merge Requests
1
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
gitlab-ce
Commits
a104e7a2
Commit
a104e7a2
authored
May 16, 2017
by
Shinya Maeda
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Move authenticate! to before
parent
427eac90
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
6 deletions
+2
-6
lib/api/pipeline_schedules.rb
lib/api/pipeline_schedules.rb
+2
-6
No files found.
lib/api/pipeline_schedules.rb
View file @
a104e7a2
...
@@ -2,6 +2,8 @@ module API
...
@@ -2,6 +2,8 @@ module API
class
PipelineSchedules
<
Grape
::
API
class
PipelineSchedules
<
Grape
::
API
include
PaginationParams
include
PaginationParams
before
{
authenticate!
}
params
do
params
do
requires
:id
,
type:
String
,
desc:
'The ID of a project'
requires
:id
,
type:
String
,
desc:
'The ID of a project'
end
end
...
@@ -13,7 +15,6 @@ module API
...
@@ -13,7 +15,6 @@ module API
use
:pagination
use
:pagination
end
end
get
':id/pipeline_schedules'
do
get
':id/pipeline_schedules'
do
authenticate!
authorize!
:read_pipeline_schedule
,
user_project
authorize!
:read_pipeline_schedule
,
user_project
pipeline_schedules
=
user_project
.
pipeline_schedules
pipeline_schedules
=
user_project
.
pipeline_schedules
...
@@ -28,7 +29,6 @@ module API
...
@@ -28,7 +29,6 @@ module API
requires
:pipeline_schedule_id
,
type:
Integer
,
desc:
'The pipeline schedule id'
requires
:pipeline_schedule_id
,
type:
Integer
,
desc:
'The pipeline schedule id'
end
end
get
':id/pipeline_schedules/:pipeline_schedule_id'
do
get
':id/pipeline_schedules/:pipeline_schedule_id'
do
authenticate!
authorize!
:read_pipeline_schedule
,
user_project
authorize!
:read_pipeline_schedule
,
user_project
pipeline_schedule
=
user_project
.
pipeline_schedules
.
find
(
params
.
delete
(
:pipeline_schedule_id
))
pipeline_schedule
=
user_project
.
pipeline_schedules
.
find
(
params
.
delete
(
:pipeline_schedule_id
))
...
@@ -48,7 +48,6 @@ module API
...
@@ -48,7 +48,6 @@ module API
requires
:active
,
type:
Boolean
,
desc:
'The activation of pipeline schedule'
requires
:active
,
type:
Boolean
,
desc:
'The activation of pipeline schedule'
end
end
post
':id/pipeline_schedules'
do
post
':id/pipeline_schedules'
do
authenticate!
authorize!
:create_pipeline_schedule
,
user_project
authorize!
:create_pipeline_schedule
,
user_project
pipeline_schedule
=
Ci
::
CreatePipelineScheduleService
pipeline_schedule
=
Ci
::
CreatePipelineScheduleService
...
@@ -74,7 +73,6 @@ module API
...
@@ -74,7 +73,6 @@ module API
optional
:active
,
type:
Boolean
,
desc:
'The activation of pipeline schedule'
optional
:active
,
type:
Boolean
,
desc:
'The activation of pipeline schedule'
end
end
put
':id/pipeline_schedules/:pipeline_schedule_id'
do
put
':id/pipeline_schedules/:pipeline_schedule_id'
do
authenticate!
authorize!
:create_pipeline_schedule
,
user_project
authorize!
:create_pipeline_schedule
,
user_project
pipeline_schedule
=
user_project
.
pipeline_schedules
.
find
(
params
.
delete
(
:pipeline_schedule_id
))
pipeline_schedule
=
user_project
.
pipeline_schedules
.
find
(
params
.
delete
(
:pipeline_schedule_id
))
...
@@ -94,7 +92,6 @@ module API
...
@@ -94,7 +92,6 @@ module API
requires
:pipeline_schedule_id
,
type:
Integer
,
desc:
'The pipeline schedule id'
requires
:pipeline_schedule_id
,
type:
Integer
,
desc:
'The pipeline schedule id'
end
end
post
':id/pipeline_schedules/:pipeline_schedule_id/take_ownership'
do
post
':id/pipeline_schedules/:pipeline_schedule_id/take_ownership'
do
authenticate!
authorize!
:create_pipeline_schedule
,
user_project
authorize!
:create_pipeline_schedule
,
user_project
pipeline_schedule
=
user_project
.
pipeline_schedules
.
find
(
params
.
delete
(
:pipeline_schedule_id
))
pipeline_schedule
=
user_project
.
pipeline_schedules
.
find
(
params
.
delete
(
:pipeline_schedule_id
))
...
@@ -115,7 +112,6 @@ module API
...
@@ -115,7 +112,6 @@ module API
requires
:pipeline_schedule_id
,
type:
Integer
,
desc:
'The pipeline schedule id'
requires
:pipeline_schedule_id
,
type:
Integer
,
desc:
'The pipeline schedule id'
end
end
delete
':id/pipeline_schedules/:pipeline_schedule_id'
do
delete
':id/pipeline_schedules/:pipeline_schedule_id'
do
authenticate!
authorize!
:admin_pipeline_schedule
,
user_project
authorize!
:admin_pipeline_schedule
,
user_project
pipeline_schedule
=
user_project
.
pipeline_schedules
.
find
(
params
.
delete
(
:pipeline_schedule_id
))
pipeline_schedule
=
user_project
.
pipeline_schedules
.
find
(
params
.
delete
(
:pipeline_schedule_id
))
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment