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
8f9e2965
Commit
8f9e2965
authored
Dec 07, 2017
by
James Lopez
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
refactor project_or_wiki
parent
04bb520e
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
20 additions
and
5 deletions
+20
-5
ee/lib/ee/gitlab/geo_git_access.rb
ee/lib/ee/gitlab/geo_git_access.rb
+6
-4
ee/lib/ee/gitlab/git_access_wiki.rb
ee/lib/ee/gitlab/git_access_wiki.rb
+13
-0
lib/gitlab/git_access_wiki.rb
lib/gitlab/git_access_wiki.rb
+1
-1
No files found.
ee/lib/ee/gitlab/geo_git_access.rb
View file @
8f9e2965
...
...
@@ -6,6 +6,12 @@ module EE
GEO_SERVER_DOCS_URL
=
'https://docs.gitlab.com/ee/gitlab-geo/using_a_geo_server.html'
.
freeze
protected
def
project_or_wiki
@project
end
private
def
push_to_read_only_message
...
...
@@ -30,10 +36,6 @@ module EE
def
current_user
user
end
def
project_or_wiki
self
.
class
.
name
==
'Gitlab::GitAccessWiki'
?
@project
.
wiki
:
@project
end
end
end
end
ee/lib/ee/gitlab/git_access_wiki.rb
0 → 100644
View file @
8f9e2965
module
EE
module
Gitlab
module
GitAccessWiki
prepend
GeoGitAccess
private
def
project_or_wiki
@project
.
wiki
end
end
end
end
lib/gitlab/git_access_wiki.rb
View file @
8f9e2965
module
Gitlab
class
GitAccessWiki
<
GitAccess
prepend
EE
::
Gitlab
::
G
eoGitAccess
prepend
EE
::
Gitlab
::
G
itAccessWiki
ERROR_MESSAGES
=
{
read_only:
"You can't push code to a read-only GitLab instance."
,
...
...
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