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
Jérome Perrin
gitlab-ce
Commits
b3249bc2
Commit
b3249bc2
authored
Nov 03, 2016
by
Douglas Barbosa Alexandre
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Use @project as default on ToggleSubscriptionAction concern
parent
4a29fde5
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
1 addition
and
13 deletions
+1
-13
app/controllers/concerns/toggle_subscription_action.rb
app/controllers/concerns/toggle_subscription_action.rb
+1
-1
app/controllers/projects/issues_controller.rb
app/controllers/projects/issues_controller.rb
+0
-4
app/controllers/projects/labels_controller.rb
app/controllers/projects/labels_controller.rb
+0
-4
app/controllers/projects/merge_requests_controller.rb
app/controllers/projects/merge_requests_controller.rb
+0
-4
No files found.
app/controllers/concerns/toggle_subscription_action.rb
View file @
b3249bc2
...
@@ -12,7 +12,7 @@ module ToggleSubscriptionAction
...
@@ -12,7 +12,7 @@ module ToggleSubscriptionAction
private
private
def
subscribable_project
def
subscribable_project
raise
NotImplementedError
@project
||
raise
(
NotImplementedError
)
end
end
def
subscribable_resource
def
subscribable_resource
...
...
app/controllers/projects/issues_controller.rb
View file @
b3249bc2
...
@@ -169,10 +169,6 @@ class Projects::IssuesController < Projects::ApplicationController
...
@@ -169,10 +169,6 @@ class Projects::IssuesController < Projects::ApplicationController
alias_method
:awardable
,
:issue
alias_method
:awardable
,
:issue
alias_method
:spammable
,
:issue
alias_method
:spammable
,
:issue
def
subscribable_project
issue
.
project
end
def
authorize_read_issue!
def
authorize_read_issue!
return
render_404
unless
can?
(
current_user
,
:read_issue
,
@issue
)
return
render_404
unless
can?
(
current_user
,
:read_issue
,
@issue
)
end
end
...
...
app/controllers/projects/labels_controller.rb
View file @
b3249bc2
...
@@ -128,10 +128,6 @@ class Projects::LabelsController < Projects::ApplicationController
...
@@ -128,10 +128,6 @@ class Projects::LabelsController < Projects::ApplicationController
@available_labels
.
find
(
params
[
:id
])
@available_labels
.
find
(
params
[
:id
])
end
end
def
subscribable_project
@project
end
def
find_labels
def
find_labels
@available_labels
||=
LabelsFinder
.
new
(
current_user
,
project_id:
@project
.
id
).
execute
@available_labels
||=
LabelsFinder
.
new
(
current_user
,
project_id:
@project
.
id
).
execute
end
end
...
...
app/controllers/projects/merge_requests_controller.rb
View file @
b3249bc2
...
@@ -473,10 +473,6 @@ class Projects::MergeRequestsController < Projects::ApplicationController
...
@@ -473,10 +473,6 @@ class Projects::MergeRequestsController < Projects::ApplicationController
alias_method
:issuable
,
:merge_request
alias_method
:issuable
,
:merge_request
alias_method
:awardable
,
:merge_request
alias_method
:awardable
,
:merge_request
def
subscribable_project
merge_request
.
project
end
def
authorize_update_merge_request!
def
authorize_update_merge_request!
return
render_404
unless
can?
(
current_user
,
:update_merge_request
,
@merge_request
)
return
render_404
unless
can?
(
current_user
,
:update_merge_request
,
@merge_request
)
end
end
...
...
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