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
d13d8347
Commit
d13d8347
authored
Jan 16, 2020
by
Imre Farkas
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Set share_group_with_group feature flag default on
parent
9cd82c24
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
10 additions
and
5 deletions
+10
-5
app/controllers/groups/group_links_controller.rb
app/controllers/groups/group_links_controller.rb
+1
-1
app/models/group.rb
app/models/group.rb
+1
-1
app/views/groups/group_members/index.html.haml
app/views/groups/group_members/index.html.haml
+2
-2
changelogs/unreleased/22986-share_group_with_group_ff_default_on.yml
...unreleased/22986-share_group_with_group_ff_default_on.yml
+5
-0
lib/gitlab/project_authorizations.rb
lib/gitlab/project_authorizations.rb
+1
-1
No files found.
app/controllers/groups/group_links_controller.rb
View file @
d13d8347
...
...
@@ -53,6 +53,6 @@ class Groups::GroupLinksController < Groups::ApplicationController
end
def
check_feature_flag!
render_404
unless
Feature
.
enabled?
(
:share_group_with_group
)
render_404
unless
Feature
.
enabled?
(
:share_group_with_group
,
default_enabled:
true
)
end
end
app/models/group.rb
View file @
d13d8347
...
...
@@ -496,7 +496,7 @@ class Group < Namespace
end
def
max_member_access_for_user_from_shared_groups
(
user
)
return
unless
Feature
.
enabled?
(
:share_group_with_group
)
return
unless
Feature
.
enabled?
(
:share_group_with_group
,
default_enabled:
true
)
group_group_link_table
=
GroupGroupLink
.
arel_table
group_member_table
=
GroupMember
.
arel_table
...
...
app/views/groups/group_members/index.html.haml
View file @
d13d8347
...
...
@@ -9,7 +9,7 @@
=
_
(
"Group members"
)
%hr
-
if
can_manage_members
-
if
Feature
.
enabled?
(
:share_group_with_group
)
-
if
Feature
.
enabled?
(
:share_group_with_group
,
default_enabled:
true
)
%ul
.nav-links.nav.nav-tabs.gitlab-tabs
{
role:
'tablist'
}
%li
.nav-tab
{
role:
'presentation'
}
%a
.nav-link.active
{
href:
'#invite-member-pane'
,
id:
'invite-member-tab'
,
data:
{
toggle:
'tab'
},
role:
'tab'
}=
_
(
"Invite member"
)
...
...
@@ -18,7 +18,7 @@
.tab-content.gitlab-tab-content
.tab-pane.active
{
id:
'invite-member-pane'
,
role:
'tabpanel'
}
=
render_invite_member_for_group
(
@group
,
@group_member
.
access_level
)
-
if
Feature
.
enabled?
(
:share_group_with_group
)
-
if
Feature
.
enabled?
(
:share_group_with_group
,
default_enabled:
true
)
.tab-pane
{
id:
'invite-group-pane'
,
role:
'tabpanel'
}
=
render
'shared/members/invite_group'
,
submit_url:
group_group_links_path
(
@group
),
access_levels:
GroupMember
.
access_level_roles
,
default_access_level:
@group_member
.
access_level
,
group_link_field:
'shared_with_group_id'
,
group_access_field:
'shared_group_access'
-
else
...
...
changelogs/unreleased/22986-share_group_with_group_ff_default_on.yml
0 → 100644
View file @
d13d8347
---
title
:
Allow to share groups with other groups
merge_request
:
23185
author
:
type
:
changed
lib/gitlab/project_authorizations.rb
View file @
d13d8347
...
...
@@ -68,7 +68,7 @@ module Gitlab
.
select
([
namespaces
[
:id
],
members
[
:access_level
]])
.
except
(
:order
)
if
Feature
.
enabled?
(
:share_group_with_group
)
if
Feature
.
enabled?
(
:share_group_with_group
,
default_enabled:
true
)
# Namespaces shared with any of the group
cte
<<
Group
.
select
([
namespaces
[
:id
],
'group_group_links.group_access AS access_level'
])
.
joins
(
join_group_group_links
)
...
...
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