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
c2602aaf
Commit
c2602aaf
authored
Oct 04, 2016
by
Phil Hughes
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Updated Ruby
parent
2a6942ab
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
4 additions
and
3 deletions
+4
-3
app/controllers/projects/group_links_controller.rb
app/controllers/projects/group_links_controller.rb
+1
-1
app/controllers/projects/project_members_controller.rb
app/controllers/projects/project_members_controller.rb
+3
-2
No files found.
app/controllers/projects/group_links_controller.rb
View file @
c2602aaf
class
Projects::GroupLinksController
<
Projects
::
ApplicationController
class
Projects::GroupLinksController
<
Projects
::
ApplicationController
layout
'project_settings'
layout
'project_settings'
before_action
:authorize_admin_project!
before_action
:authorize_admin_project!
before_action
:authorize_admin_project_member!
,
only:
[
:update
]
def
index
def
index
@group_links
=
project
.
project_group_links
.
all
@group_links
=
project
.
project_group_links
.
all
...
@@ -21,7 +22,6 @@ class Projects::GroupLinksController < Projects::ApplicationController
...
@@ -21,7 +22,6 @@ class Projects::GroupLinksController < Projects::ApplicationController
def
update
def
update
@group_link
=
@project
.
project_group_links
.
find
(
params
[
:id
])
@group_link
=
@project
.
project_group_links
.
find
(
params
[
:id
])
return
render_403
unless
can?
(
current_user
,
:admin_project_member
,
@project
)
@group_link
.
update_attributes
(
group_link_params
)
@group_link
.
update_attributes
(
group_link_params
)
end
end
...
...
app/controllers/projects/project_members_controller.rb
View file @
c2602aaf
...
@@ -19,8 +19,7 @@ class Projects::ProjectMembersController < Projects::ApplicationController
...
@@ -19,8 +19,7 @@ class Projects::ProjectMembersController < Projects::ApplicationController
@groups
=
@project
.
project_group_links
.
where
(
group_id:
group_ids
)
@groups
=
@project
.
project_group_links
.
where
(
group_id:
group_ids
)
end
end
@project_members
=
@project_members
.
order
(
'access_level DESC'
)
@project_members
=
@project_members
.
order
(
access_level: :desc
).
page
(
params
[
:page
])
@project_members
=
@project_members
.
page
(
params
[
:page
])
@requesters
=
AccessRequestsFinder
.
new
(
@project
).
execute
(
current_user
)
@requesters
=
AccessRequestsFinder
.
new
(
@project
).
execute
(
current_user
)
...
@@ -40,6 +39,8 @@ class Projects::ProjectMembersController < Projects::ApplicationController
...
@@ -40,6 +39,8 @@ class Projects::ProjectMembersController < Projects::ApplicationController
groups
=
Group
.
where
(
id:
group_ids
)
groups
=
Group
.
where
(
id:
group_ids
)
groups
.
each
do
|
group
|
groups
.
each
do
|
group
|
next
unless
can?
(
current_user
,
:read_group
,
group
)
project
.
project_group_links
.
create
(
project
.
project_group_links
.
create
(
group:
group
,
group:
group
,
group_access:
params
[
:access_level
],
group_access:
params
[
:access_level
],
...
...
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