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
a65da7c5
Commit
a65da7c5
authored
Oct 10, 2016
by
Valery Sizov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Group Approvers. Fixes after review
parent
33416a7e
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
3 additions
and
15 deletions
+3
-15
app/controllers/groups_controller.rb
app/controllers/groups_controller.rb
+1
-7
app/views/projects/_merge_request_settings.html.haml
app/views/projects/_merge_request_settings.html.haml
+1
-1
app/views/shared/issuable/_approvals.html.haml
app/views/shared/issuable/_approvals.html.haml
+1
-1
config/routes/group.rb
config/routes/group.rb
+0
-6
No files found.
app/controllers/groups_controller.rb
View file @
a65da7c5
...
...
@@ -6,7 +6,7 @@ class GroupsController < Groups::ApplicationController
respond_to
:html
before_action
:authenticate_user!
,
only:
[
:new
,
:create
]
before_action
:group
,
except:
[
:index
,
:new
,
:create
,
:autocomplete
]
before_action
:group
,
except:
[
:index
,
:new
,
:create
]
# Authorize
before_action
:authorize_admin_group!
,
only:
[
:edit
,
:update
,
:destroy
,
:projects
]
...
...
@@ -92,12 +92,6 @@ class GroupsController < Groups::ApplicationController
redirect_to
root_path
,
alert:
"Group '
#{
@group
.
name
}
' was scheduled for deletion."
end
def
autocomplete
groups
=
Group
.
search
(
params
[
:search
]).
where
.
not
(
path:
params
[
:skip_groups
]).
limit
(
params
[
:per_page
])
render
json:
groups
.
to_json
end
protected
def
setup_projects
...
...
app/views/projects/_merge_request_settings.html.haml
View file @
a65da7c5
...
...
@@ -63,7 +63,7 @@
Add an approver suggestion for each merge request
=
f
.
label
:approver_group_ids
,
class:
'label-light'
do
Approver groups
-
skip_groups
=
@project
.
approver_groups
.
includes
(
:group
).
map
{
|
ag
|
ag
.
group
.
id
}
-
skip_groups
=
@project
.
approver_groups
.
pluck
(
:group_id
)
=
groups_select_tag
(
'project[approver_group_ids]'
,
multiple:
true
,
data:
{
skip_groups:
skip_groups
,
all_available:
true
},
class:
'input-large'
)
.help-block
Add a group as an approver suggestion for each merge request
...
...
app/views/shared/issuable/_approvals.html.haml
View file @
a65da7c5
...
...
@@ -21,7 +21,7 @@
This merge request must be approved by these users.
You can override the project settings by setting your own list of approvers.
-
skip_groups
=
issuable
.
overall_approver_groups
.
includes
(
:group
).
map
{
|
ag
|
ag
.
group
.
id
}
-
skip_groups
=
issuable
.
overall_approver_groups
.
pluck
(
:group_id
)
=
groups_select_tag
(
'merge_request[approver_group_ids]'
,
multiple:
true
,
data:
{
skip_groups:
skip_groups
,
all_available:
true
},
class:
'input-large'
)
.help-block
This merge request must be approved by members of these groups.
...
...
config/routes/group.rb
View file @
a65da7c5
...
...
@@ -14,12 +14,6 @@ resources :groups, constraints: { id: /[a-zA-Z.0-9_\-]+(?<!\.atom)/ } do
get
:activity
end
## EE-specific
collection
do
get
:autocomplete
end
## EE-specific
scope
module: :groups
do
## EE-specific
resource
:analytics
,
only:
[
:show
]
...
...
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