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
4ff1fc35
Commit
4ff1fc35
authored
Jul 11, 2014
by
Dmitriy Zaporozhets
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Remove attr_accessible from EE only models
Signed-off-by:
Dmitriy Zaporozhets
<
dmitriy.zaporozhets@gmail.com
>
parent
a74b66cd
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
9 additions
and
10 deletions
+9
-10
app/controllers/projects/git_hooks_controller.rb
app/controllers/projects/git_hooks_controller.rb
+8
-1
app/controllers/projects/services_controller.rb
app/controllers/projects/services_controller.rb
+1
-1
app/models/appearance.rb
app/models/appearance.rb
+0
-2
app/models/git_hook.rb
app/models/git_hook.rb
+0
-2
app/models/project_services/jenkins_service.rb
app/models/project_services/jenkins_service.rb
+0
-2
app/models/project_services/jira_service.rb
app/models/project_services/jira_service.rb
+0
-2
No files found.
app/controllers/projects/git_hooks_controller.rb
View file @
4ff1fc35
...
...
@@ -14,7 +14,7 @@ class Projects::GitHooksController < Projects::ApplicationController
def
update
@pre_receive_hook
=
project
.
git_hook
@pre_receive_hook
.
update_attributes
(
params
[
:git_hook
]
)
@pre_receive_hook
.
update_attributes
(
git_hook_params
)
if
@pre_receive_hook
.
valid?
redirect_to
project_git_hooks_path
(
@project
)
...
...
@@ -22,4 +22,11 @@ class Projects::GitHooksController < Projects::ApplicationController
render
:index
end
end
private
# Only allow a trusted parameter "white list" through.
def
git_hook_params
params
.
require
(
:git_hook
).
permit
(
:deny_delete_tag
,
:delete_branch_regex
,
:commit_message_regex
,
:force_push_regex
)
end
end
app/controllers/projects/services_controller.rb
View file @
4ff1fc35
...
...
@@ -40,7 +40,7 @@ class Projects::ServicesController < Projects::ApplicationController
def
service_params
params
.
require
(
:service
).
permit
(
:title
,
:token
,
:type
,
:active
,
:api_key
,
:subdomain
,
:room
,
:recipients
,
:project_url
:room
,
:recipients
,
:project_url
,
:username
,
:password
,
:api_version
)
end
end
app/models/appearance.rb
View file @
4ff1fc35
class
Appearance
<
ActiveRecord
::
Base
attr_accessible
:title
,
:description
,
:logo
validates
:title
,
presence:
true
validates
:description
,
presence:
true
validates
:logo
,
file_size:
{
maximum:
1000
.
kilobytes
.
to_i
}
...
...
app/models/git_hook.rb
View file @
4ff1fc35
class
GitHook
<
ActiveRecord
::
Base
attr_accessible
:deny_delete_tag
,
:delete_branch_regex
,
:commit_message_regex
,
:force_push_regex
belongs_to
:project
validates
:project
,
presence:
true
...
...
app/models/project_services/jenkins_service.rb
View file @
4ff1fc35
...
...
@@ -18,8 +18,6 @@
#
class
JenkinsService
<
CiService
attr_accessible
:project_url
validates
:project_url
,
presence:
true
,
if: :activated?
delegate
:execute
,
to: :service_hook
,
prefix:
nil
...
...
app/models/project_services/jira_service.rb
View file @
4ff1fc35
...
...
@@ -20,9 +20,7 @@
# api_version :string(255)
class
JiraService
<
Service
include
HTTParty
attr_accessible
:project_url
,
:username
,
:password
,
:api_version
validates
:username
,
:password
,
presence:
true
,
if: :activated?
before_validation
:set_api_version
...
...
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