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
Boxiang Sun
gitlab-ce
Commits
00408f37
Commit
00408f37
authored
Feb 20, 2015
by
Douwe Maan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Move 'require_non_empty_project' filter to front so 'assign_ref_vars' doesn't 404.
parent
6b0199ff
Changes
13
Show whitespace changes
Inline
Side-by-side
Showing
13 changed files
with
12 additions
and
13 deletions
+12
-13
app/controllers/projects/blame_controller.rb
app/controllers/projects/blame_controller.rb
+1
-1
app/controllers/projects/blob_controller.rb
app/controllers/projects/blob_controller.rb
+1
-1
app/controllers/projects/branches_controller.rb
app/controllers/projects/branches_controller.rb
+0
-1
app/controllers/projects/commit_controller.rb
app/controllers/projects/commit_controller.rb
+1
-1
app/controllers/projects/commits_controller.rb
app/controllers/projects/commits_controller.rb
+1
-1
app/controllers/projects/compare_controller.rb
app/controllers/projects/compare_controller.rb
+1
-1
app/controllers/projects/forks_controller.rb
app/controllers/projects/forks_controller.rb
+1
-1
app/controllers/projects/graphs_controller.rb
app/controllers/projects/graphs_controller.rb
+1
-1
app/controllers/projects/network_controller.rb
app/controllers/projects/network_controller.rb
+1
-1
app/controllers/projects/raw_controller.rb
app/controllers/projects/raw_controller.rb
+1
-1
app/controllers/projects/refs_controller.rb
app/controllers/projects/refs_controller.rb
+1
-1
app/controllers/projects/repositories_controller.rb
app/controllers/projects/repositories_controller.rb
+1
-1
app/controllers/projects/tree_controller.rb
app/controllers/projects/tree_controller.rb
+1
-1
No files found.
app/controllers/projects/blame_controller.rb
View file @
00408f37
...
@@ -2,9 +2,9 @@
...
@@ -2,9 +2,9 @@
class
Projects::BlameController
<
Projects
::
ApplicationController
class
Projects::BlameController
<
Projects
::
ApplicationController
include
ExtractsPath
include
ExtractsPath
before_filter
:require_non_empty_project
before_filter
:assign_ref_vars
before_filter
:assign_ref_vars
before_filter
:authorize_download_code!
before_filter
:authorize_download_code!
before_filter
:require_non_empty_project
def
show
def
show
@blob
=
@repository
.
blob_at
(
@commit
.
id
,
@path
)
@blob
=
@repository
.
blob_at
(
@commit
.
id
,
@path
)
...
...
app/controllers/projects/blob_controller.rb
View file @
00408f37
...
@@ -5,8 +5,8 @@ class Projects::BlobController < Projects::ApplicationController
...
@@ -5,8 +5,8 @@ class Projects::BlobController < Projects::ApplicationController
# Raised when given an invalid file path
# Raised when given an invalid file path
class
InvalidPathError
<
StandardError
;
end
class
InvalidPathError
<
StandardError
;
end
before_filter
:authorize_download_code!
before_filter
:require_non_empty_project
,
except:
[
:new
,
:create
]
before_filter
:require_non_empty_project
,
except:
[
:new
,
:create
]
before_filter
:authorize_download_code!
before_filter
:authorize_push_code!
,
only:
[
:destroy
]
before_filter
:authorize_push_code!
,
only:
[
:destroy
]
before_filter
:assign_blob_vars
before_filter
:assign_blob_vars
before_filter
:commit
,
except:
[
:new
,
:create
]
before_filter
:commit
,
except:
[
:new
,
:create
]
...
...
app/controllers/projects/branches_controller.rb
View file @
00408f37
...
@@ -2,7 +2,6 @@ class Projects::BranchesController < Projects::ApplicationController
...
@@ -2,7 +2,6 @@ class Projects::BranchesController < Projects::ApplicationController
include
ActionView
::
Helpers
::
SanitizeHelper
include
ActionView
::
Helpers
::
SanitizeHelper
# Authorize
# Authorize
before_filter
:require_non_empty_project
before_filter
:require_non_empty_project
before_filter
:authorize_download_code!
before_filter
:authorize_download_code!
before_filter
:authorize_push_code!
,
only:
[
:create
,
:destroy
]
before_filter
:authorize_push_code!
,
only:
[
:create
,
:destroy
]
...
...
app/controllers/projects/commit_controller.rb
View file @
00408f37
...
@@ -3,8 +3,8 @@
...
@@ -3,8 +3,8 @@
# Not to be confused with CommitsController, plural.
# Not to be confused with CommitsController, plural.
class
Projects::CommitController
<
Projects
::
ApplicationController
class
Projects::CommitController
<
Projects
::
ApplicationController
# Authorize
# Authorize
before_filter
:authorize_download_code!
before_filter
:require_non_empty_project
before_filter
:require_non_empty_project
before_filter
:authorize_download_code!
before_filter
:commit
before_filter
:commit
def
show
def
show
...
...
app/controllers/projects/commits_controller.rb
View file @
00408f37
...
@@ -3,9 +3,9 @@ require "base64"
...
@@ -3,9 +3,9 @@ require "base64"
class
Projects::CommitsController
<
Projects
::
ApplicationController
class
Projects::CommitsController
<
Projects
::
ApplicationController
include
ExtractsPath
include
ExtractsPath
before_filter
:require_non_empty_project
before_filter
:assign_ref_vars
before_filter
:assign_ref_vars
before_filter
:authorize_download_code!
before_filter
:authorize_download_code!
before_filter
:require_non_empty_project
def
show
def
show
@repo
=
@project
.
repository
@repo
=
@project
.
repository
...
...
app/controllers/projects/compare_controller.rb
View file @
00408f37
class
Projects::CompareController
<
Projects
::
ApplicationController
class
Projects::CompareController
<
Projects
::
ApplicationController
# Authorize
# Authorize
before_filter
:authorize_download_code!
before_filter
:require_non_empty_project
before_filter
:require_non_empty_project
before_filter
:authorize_download_code!
def
index
def
index
end
end
...
...
app/controllers/projects/forks_controller.rb
View file @
00408f37
class
Projects::ForksController
<
Projects
::
ApplicationController
class
Projects::ForksController
<
Projects
::
ApplicationController
# Authorize
# Authorize
before_filter
:authorize_download_code!
before_filter
:require_non_empty_project
before_filter
:require_non_empty_project
before_filter
:authorize_download_code!
def
new
def
new
@namespaces
=
current_user
.
manageable_namespaces
@namespaces
=
current_user
.
manageable_namespaces
...
...
app/controllers/projects/graphs_controller.rb
View file @
00408f37
class
Projects::GraphsController
<
Projects
::
ApplicationController
class
Projects::GraphsController
<
Projects
::
ApplicationController
# Authorize
# Authorize
before_filter
:authorize_download_code!
before_filter
:require_non_empty_project
before_filter
:require_non_empty_project
before_filter
:authorize_download_code!
def
show
def
show
respond_to
do
|
format
|
respond_to
do
|
format
|
...
...
app/controllers/projects/network_controller.rb
View file @
00408f37
...
@@ -2,9 +2,9 @@ class Projects::NetworkController < Projects::ApplicationController
...
@@ -2,9 +2,9 @@ class Projects::NetworkController < Projects::ApplicationController
include
ExtractsPath
include
ExtractsPath
include
ApplicationHelper
include
ApplicationHelper
before_filter
:require_non_empty_project
before_filter
:assign_ref_vars
before_filter
:assign_ref_vars
before_filter
:authorize_download_code!
before_filter
:authorize_download_code!
before_filter
:require_non_empty_project
def
show
def
show
respond_to
do
|
format
|
respond_to
do
|
format
|
...
...
app/controllers/projects/raw_controller.rb
View file @
00408f37
...
@@ -2,9 +2,9 @@
...
@@ -2,9 +2,9 @@
class
Projects::RawController
<
Projects
::
ApplicationController
class
Projects::RawController
<
Projects
::
ApplicationController
include
ExtractsPath
include
ExtractsPath
before_filter
:require_non_empty_project
before_filter
:assign_ref_vars
before_filter
:assign_ref_vars
before_filter
:authorize_download_code!
before_filter
:authorize_download_code!
before_filter
:require_non_empty_project
def
show
def
show
@blob
=
@repository
.
blob_at
(
@commit
.
id
,
@path
)
@blob
=
@repository
.
blob_at
(
@commit
.
id
,
@path
)
...
...
app/controllers/projects/refs_controller.rb
View file @
00408f37
class
Projects::RefsController
<
Projects
::
ApplicationController
class
Projects::RefsController
<
Projects
::
ApplicationController
include
ExtractsPath
include
ExtractsPath
before_filter
:require_non_empty_project
before_filter
:assign_ref_vars
before_filter
:assign_ref_vars
before_filter
:authorize_download_code!
before_filter
:authorize_download_code!
before_filter
:require_non_empty_project
def
switch
def
switch
respond_to
do
|
format
|
respond_to
do
|
format
|
...
...
app/controllers/projects/repositories_controller.rb
View file @
00408f37
class
Projects::RepositoriesController
<
Projects
::
ApplicationController
class
Projects::RepositoriesController
<
Projects
::
ApplicationController
# Authorize
# Authorize
before_filter
:authorize_download_code!
before_filter
:require_non_empty_project
,
except: :create
before_filter
:require_non_empty_project
,
except: :create
before_filter
:authorize_download_code!
before_filter
:authorize_admin_project!
,
only: :create
before_filter
:authorize_admin_project!
,
only: :create
def
create
def
create
...
...
app/controllers/projects/tree_controller.rb
View file @
00408f37
...
@@ -2,9 +2,9 @@
...
@@ -2,9 +2,9 @@
class
Projects::TreeController
<
Projects
::
ApplicationController
class
Projects::TreeController
<
Projects
::
ApplicationController
include
ExtractsPath
include
ExtractsPath
before_filter
:require_non_empty_project
,
except:
[
:new
,
:create
]
before_filter
:assign_ref_vars
before_filter
:assign_ref_vars
before_filter
:authorize_download_code!
before_filter
:authorize_download_code!
before_filter
:require_non_empty_project
,
except:
[
:new
,
:create
]
def
show
def
show
if
tree
.
entries
.
empty?
if
tree
.
entries
.
empty?
...
...
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