@@ -2,9 +2,9 @@ module Ci
2
2
class ProjectsController < Ci ::ApplicationController
3
3
before_action :authenticate_user! , except : [ :build , :badge , :show ]
4
4
before_action :authenticate_public_page! , only : :show
5
- before_action :project , only : [ :build , :show , :badge , :edit , :update , :destroy , : toggle_shared_runners, :dumped_yaml ]
5
+ before_action :project , only : [ :build , :show , :badge , :toggle_shared_runners , :dumped_yaml ]
6
6
before_action :authorize_access_project! , except : [ :build , :badge , :show , :new , :disabled ]
7
- before_action :authorize_manage_project! , only : [ :edit , :update , :destroy , : toggle_shared_runners, :dumped_yaml ]
7
+ before_action :authorize_manage_project! , only : [ :toggle_shared_runners , :dumped_yaml ]
8
8
before_action :authenticate_token! , only : [ :build ]
9
9
before_action :no_cache , only : [ :badge ]
10
10
skip_before_action :check_enable_flag! , only : [ :disabled ]
@@ -23,28 +23,6 @@ def show
23
23
@commits = @commits . page ( params [ :page ] ) . per ( 20 )
24
24
end
25
25
26
- def edit
27
- end
28
-
29
- def update
30
- if project . update_attributes ( project_params )
31
- Ci ::EventService . new . change_project_settings ( current_user , project )
32
-
33
- redirect_to :back , notice : 'Project was successfully updated.'
34
- else
35
- render action : "edit"
36
- end
37
- end
38
-
39
- def destroy
40
- project . gl_project . gitlab_ci_service . update_attributes ( active : false )
41
- project . destroy
42
-
43
- Ci ::EventService . new . remove_project ( current_user , project )
44
-
45
- redirect_to ci_projects_url
46
- end
47
-
48
26
# Project status badge
49
27
# Image with build status for sha or ref
50
28
def badge
@@ -74,12 +52,5 @@ def no_cache
74
52
response . headers [ "Pragma" ] = "no-cache"
75
53
response . headers [ "Expires" ] = "Fri, 01 Jan 1990 00:00:00 GMT"
76
54
end
77
-
78
- def project_params
79
- params . require ( :project ) . permit ( :path , :timeout , :timeout_in_minutes , :default_ref , :always_build ,
80
- :polling_interval , :public , :ssh_url_to_repo , :allow_git_fetch , :email_recipients ,
81
- :email_add_pusher , :email_only_broken_builds , :coverage_regex , :shared_runners_enabled , :token ,
82
- { variables_attributes : [ :id , :key , :value , :_destroy ] } )
83
- end
84
55
end
85
56
end
0 commit comments