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
4713fbd2
Commit
4713fbd2
authored
Nov 21, 2014
by
Marin Jankovski
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add removal and addition of the user to the project membership to audit events.
parent
8f1190f7
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
22 additions
and
1 deletion
+22
-1
app/controllers/projects/team_members_controller.rb
app/controllers/projects/team_members_controller.rb
+22
-1
No files found.
app/controllers/projects/team_members_controller.rb
View file @
4713fbd2
...
...
@@ -19,6 +19,16 @@ class Projects::TeamMembersController < Projects::ApplicationController
@project
.
team
<<
[
users
,
params
[
:access_level
]]
users
.
each
do
|
user
|
details
=
{
add:
"user_access"
,
target_id:
user
.
id
,
target_type:
"User"
,
target_details:
user
.
name
,
}
AuditEventService
.
new
(
current_user
,
@project
,
details
).
security_event
end
if
params
[
:redirect_to
]
redirect_to
params
[
:redirect_to
]
else
...
...
@@ -50,7 +60,18 @@ class Projects::TeamMembersController < Projects::ApplicationController
def
destroy
@user_project_relation
=
@project
.
project_members
.
find_by
(
user_id:
member
)
@user_project_relation
.
destroy
user_id
=
@user_project_relation
.
user_id
user_name
=
@user_project_relation
.
user
.
name
if
@user_project_relation
.
destroy
details
=
{
remove:
"user_access"
,
target_id:
user_id
,
target_type:
"User"
,
target_details:
user_name
,
}
AuditEventService
.
new
(
current_user
,
@project
,
details
).
security_event
end
respond_to
do
|
format
|
format
.
html
{
redirect_to
project_team_index_path
(
@project
)
}
...
...
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