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
8d5fa833
Commit
8d5fa833
authored
Sep 15, 2017
by
James Lopez
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix update service
parent
3e267417
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
29 additions
and
29 deletions
+29
-29
app/services/users/update_service.rb
app/services/users/update_service.rb
+1
-1
ee/app/services/ee/audit_event_service.rb
ee/app/services/ee/audit_event_service.rb
+28
-28
No files found.
app/services/users/update_service.rb
View file @
8d5fa833
...
@@ -17,7 +17,7 @@ module Users
...
@@ -17,7 +17,7 @@ module Users
user_exists
=
@user
.
persisted?
user_exists
=
@user
.
persisted?
if
@user
.
save
(
validate:
validate
)
if
@user
.
save
(
validate:
validate
)
audit_changes
(
:email
,
as:
'email address'
,
column: :notification_email
)
audit_changes
(
:email
,
as:
'email address'
)
audit_changes
(
:encrypted_password
,
as:
'password'
,
skip_changes:
true
)
audit_changes
(
:encrypted_password
,
as:
'password'
,
skip_changes:
true
)
notify_new_user
(
@user
,
nil
)
unless
user_exists
notify_new_user
(
@user
,
nil
)
unless
user_exists
...
...
ee/app/services/ee/audit_event_service.rb
View file @
8d5fa833
...
@@ -57,15 +57,15 @@ module EE
...
@@ -57,15 +57,15 @@ module EE
def
for_changes
def
for_changes
@details
=
@details
=
{
{
change:
@details
[
:as
]
||
@details
[
:column
],
change:
@details
[
:as
]
||
@details
[
:column
],
from:
@details
[
:from
],
from:
@details
[
:from
],
to:
@details
[
:to
],
to:
@details
[
:to
],
author_name:
@author
.
name
,
author_name:
@author
.
name
,
target_id:
@entity
.
id
,
target_id:
@entity
.
id
,
target_type:
@entity
.
class
,
target_type:
@entity
.
class
,
target_details:
@entity
.
name
target_details:
@entity
.
name
}
}
self
self
end
end
...
@@ -110,7 +110,7 @@ module EE
...
@@ -110,7 +110,7 @@ module EE
def
method_missing
(
method_sym
,
*
arguments
,
&
block
)
def
method_missing
(
method_sym
,
*
arguments
,
&
block
)
super
(
method_sym
,
*
arguments
,
&
block
)
unless
respond_to?
(
method_sym
)
super
(
method_sym
,
*
arguments
,
&
block
)
unless
respond_to?
(
method_sym
)
for_custom_model
(
method_sym
.
to_s
.
s
lice
(
'for_'
)
,
*
arguments
)
for_custom_model
(
method_sym
.
to_s
.
s
plit
(
'for_'
).
last
,
*
arguments
)
end
end
def
respond_to?
(
method
,
include_private
=
false
)
def
respond_to?
(
method
,
include_private
=
false
)
...
@@ -125,24 +125,24 @@ module EE
...
@@ -125,24 +125,24 @@ module EE
model_class
=
model
.
camelize
model_class
=
model
.
camelize
@details
=
@details
=
case
action
case
action
when
:destroy
when
:destroy
{
{
remove:
model
,
remove:
model
,
author_name:
author_name
,
author_name:
author_name
,
target_id:
key_title
,
target_id:
key_title
,
target_type:
model_class
,
target_type:
model_class
,
target_details:
key_title
target_details:
key_title
}
}
when
:create
when
:create
{
{
add:
model
,
add:
model
,
author_name:
author_name
,
author_name:
author_name
,
target_id:
key_title
,
target_id:
key_title
,
target_type:
model_class
,
target_type:
model_class
,
target_details:
key_title
target_details:
key_title
}
}
end
end
self
self
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