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
a9c62fde
Commit
a9c62fde
authored
Jun 02, 2020
by
Doug Stull
Committed by
Bob Van Landuyt
Jun 02, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Remove unused group links route
- not used except by a test...
parent
27b223d5
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
4 additions
and
50 deletions
+4
-50
app/controllers/projects/group_links_controller.rb
app/controllers/projects/group_links_controller.rb
+0
-4
config/routes/group.rb
config/routes/group.rb
+1
-1
config/routes/project.rb
config/routes/project.rb
+1
-1
spec/features/projects/members/invite_group_spec.rb
spec/features/projects/members/invite_group_spec.rb
+2
-0
spec/features/projects/settings/user_manages_group_links_spec.rb
...atures/projects/settings/user_manages_group_links_spec.rb
+0
-44
No files found.
app/controllers/projects/group_links_controller.rb
View file @
a9c62fde
...
...
@@ -5,10 +5,6 @@ class Projects::GroupLinksController < Projects::ApplicationController
before_action
:authorize_admin_project!
before_action
:authorize_admin_project_member!
,
only:
[
:update
]
def
index
redirect_to
namespace_project_project_members_path
end
def
create
group
=
Group
.
find
(
params
[
:link_group_id
])
if
params
[
:link_group_id
].
present?
...
...
config/routes/group.rb
View file @
a9c62fde
...
...
@@ -78,7 +78,7 @@ constraints(::Constraints::GroupUrlConstrainer.new) do
delete
:leave
,
on: :collection
end
resources
:group_links
,
only:
[
:
index
,
:
create
,
:update
,
:destroy
],
constraints:
{
id:
/\d+/
}
resources
:group_links
,
only:
[
:create
,
:update
,
:destroy
],
constraints:
{
id:
/\d+/
}
resources
:uploads
,
only:
[
:create
]
do
collection
do
...
...
config/routes/project.rb
View file @
a9c62fde
...
...
@@ -199,7 +199,7 @@ constraints(::Constraints::ProjectUrlConstrainer.new) do
resources
:starrers
,
only:
[
:index
]
resources
:forks
,
only:
[
:index
,
:new
,
:create
]
resources
:group_links
,
only:
[
:
index
,
:
create
,
:update
,
:destroy
],
constraints:
{
id:
/\d+/
}
resources
:group_links
,
only:
[
:create
,
:update
,
:destroy
],
constraints:
{
id:
/\d+/
}
resource
:import
,
only:
[
:new
,
:create
,
:show
]
resource
:avatar
,
only:
[
:show
,
:destroy
]
...
...
spec/features/projects/members/invite_group_spec.rb
View file @
a9c62fde
...
...
@@ -39,6 +39,8 @@ describe 'Project > Members > Invite group', :js do
it
'the project can be shared with another group'
do
visit
project_project_members_path
(
project
)
expect
(
page
).
not_to
have_css
(
'.project-members-groups'
)
click_on
'invite-group-tab'
select2
group_to_share_with
.
id
,
from:
'#link_group_id'
...
...
spec/features/projects/settings/user_manages_group_links_spec.rb
deleted
100644 → 0
View file @
27b223d5
# frozen_string_literal: true
require
'spec_helper'
describe
'Projects > Settings > User manages group links'
do
include
Select2Helper
let
(
:user
)
{
create
(
:user
)
}
let
(
:project
)
{
create
(
:project
,
namespace:
user
.
namespace
)
}
let
(
:group_ops
)
{
create
(
:group
,
name:
'Ops'
)
}
let
(
:group_market
)
{
create
(
:group
,
name:
'Market'
,
path:
'market'
)
}
before
do
project
.
add_maintainer
(
user
)
group_market
.
add_guest
(
user
)
sign_in
(
user
)
share_link
=
project
.
project_group_links
.
new
(
group_access:
Gitlab
::
Access
::
MAINTAINER
)
share_link
.
group_id
=
group_ops
.
id
share_link
.
save!
visit
(
project_group_links_path
(
project
))
end
it
'shows a list of groups'
do
page
.
within
(
'.project-members-groups'
)
do
expect
(
page
).
to
have_content
(
'Ops'
)
expect
(
page
).
not_to
have_content
(
'Market'
)
end
end
it
'invites a group to a project'
,
:js
do
click_link
(
'Invite group'
)
select2
(
group_market
.
id
,
from:
'#link_group_id'
)
select
(
'Maintainer'
,
from:
'link_group_access'
)
click_button
(
'Invite'
)
page
.
within
(
'.project-members-groups'
)
do
expect
(
page
).
to
have_content
(
'Market'
)
end
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