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
35f275c4
Commit
35f275c4
authored
Jun 19, 2018
by
Jan Beckmann
Committed by
Rémy Coutable
Jun 27, 2018
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add extra blank lines, use with_issues_available_for_user
parent
ac457742
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
6 additions
and
1 deletion
+6
-1
lib/api/groups.rb
lib/api/groups.rb
+1
-1
spec/features/groups/empty_states_spec.rb
spec/features/groups/empty_states_spec.rb
+2
-0
spec/features/groups/issues_spec.rb
spec/features/groups/issues_spec.rb
+2
-0
spec/features/groups/merge_requests_spec.rb
spec/features/groups/merge_requests_spec.rb
+1
-0
No files found.
lib/api/groups.rb
View file @
35f275c4
...
...
@@ -67,7 +67,7 @@ module API
def
find_group_projects
(
params
)
group
=
find_group!
(
params
[
:id
])
projects
=
GroupProjectsFinder
.
new
(
group:
group
,
current_user:
current_user
,
params:
project_finder_params
).
execute
projects
=
projects
.
with_issues_
enabled
if
params
[
:with_issues_enabled
]
projects
=
projects
.
with_issues_
available_for_user
(
current_user
)
if
params
[
:with_issues_enabled
]
projects
=
projects
.
with_merge_requests_enabled
if
params
[
:with_merge_requests_enabled
]
projects
=
reorder_projects
(
projects
)
paginate
(
projects
)
...
...
spec/features/groups/empty_states_spec.rb
View file @
35f275c4
...
...
@@ -110,9 +110,11 @@ feature 'Group empty states' do
context
'group has only a project with issues disabled'
do
let
(
:project_with_issues_disabled
)
{
create
(
:empty_project
,
:issues_disabled
,
group:
group
)
}
before
do
visit
path
end
it_behaves_like
"no projects"
end
end
...
...
spec/features/groups/issues_spec.rb
View file @
35f275c4
...
...
@@ -81,11 +81,13 @@ feature 'Group issues page' do
context
'projects with issues disabled'
do
describe
'issue dropdown'
do
let
(
:user_in_group
)
{
create
(
:group_member
,
:master
,
user:
create
(
:user
),
group:
group
).
user
}
before
do
[
project
,
project_with_issues_disabled
].
each
{
|
project
|
project
.
add_master
(
user_in_group
)
}
sign_in
(
user_in_group
)
visit
issues_group_path
(
group
)
end
it
'shows projects only with issues feature enabled'
,
:js
do
find
(
'.new-project-item-link'
).
click
...
...
spec/features/groups/merge_requests_spec.rb
View file @
35f275c4
...
...
@@ -59,6 +59,7 @@ feature 'Group merge requests page' do
describe
'new merge request dropdown'
do
let
(
:project_with_merge_requests_disabled
)
{
create
(
:project
,
:merge_requests_disabled
,
group:
group
)
}
before
do
visit
path
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