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
0
Merge Requests
0
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
Kazuhiko Shiozaki
gitlab-ce
Commits
24332b7b
Commit
24332b7b
authored
Aug 11, 2015
by
Dmitriy Zaporozhets
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Revert "Make web editor work correctly after switch from satellites"
This reverts commit
435f680b
.
parent
d4cfa0bf
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
5 additions
and
7 deletions
+5
-7
app/services/files/base_service.rb
app/services/files/base_service.rb
+1
-2
app/services/files/create_service.rb
app/services/files/create_service.rb
+1
-1
app/services/files/delete_service.rb
app/services/files/delete_service.rb
+1
-1
app/services/files/update_service.rb
app/services/files/update_service.rb
+1
-1
app/services/git_push_service.rb
app/services/git_push_service.rb
+1
-2
No files found.
app/services/files/base_service.rb
View file @
24332b7b
...
...
@@ -17,8 +17,7 @@ module Files
def
after_commit
(
sha
)
commit
=
repository
.
commit
(
sha
)
full_ref
=
'refs/heads/'
+
(
params
[
:new_branch
]
||
ref
)
old_sha
=
commit
.
parent_id
||
Gitlab
::
Git
::
BLANK_SHA
GitPushService
.
new
.
execute
(
project
,
current_user
,
old_sha
,
sha
,
full_ref
)
GitPushService
.
new
.
execute
(
project
,
current_user
,
commit
.
parent_id
,
sha
,
full_ref
)
end
end
end
app/services/files/create_service.rb
View file @
24332b7b
require_relative
"base_service"
module
Files
class
CreateService
<
Files
::
BaseService
class
CreateService
<
BaseService
def
execute
allowed
=
Gitlab
::
GitAccess
.
new
(
current_user
,
project
).
can_push_to_branch?
(
ref
)
...
...
app/services/files/delete_service.rb
View file @
24332b7b
require_relative
"base_service"
module
Files
class
DeleteService
<
Files
::
BaseService
class
DeleteService
<
BaseService
def
execute
allowed
=
::
Gitlab
::
GitAccess
.
new
(
current_user
,
project
).
can_push_to_branch?
(
ref
)
...
...
app/services/files/update_service.rb
View file @
24332b7b
require_relative
"base_service"
module
Files
class
UpdateService
<
Files
::
BaseService
class
UpdateService
<
BaseService
def
execute
allowed
=
::
Gitlab
::
GitAccess
.
new
(
current_user
,
project
).
can_push_to_branch?
(
ref
)
...
...
app/services/git_push_service.rb
View file @
24332b7b
...
...
@@ -133,8 +133,7 @@ class GitPushService
end
def
is_default_branch?
(
ref
)
Gitlab
::
Git
.
branch_ref?
(
ref
)
&&
(
Gitlab
::
Git
.
ref_name
(
ref
)
==
project
.
default_branch
||
project
.
default_branch
.
nil?
)
Gitlab
::
Git
.
branch_ref?
(
ref
)
&&
Gitlab
::
Git
.
ref_name
(
ref
)
==
project
.
default_branch
end
def
commit_user
(
commit
)
...
...
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