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
f1ec3387
Commit
f1ec3387
authored
Feb 22, 2020
by
Tan Le
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix param type and name order
The correct placement is type following by name as per Yardoc format.
parent
eb3770c9
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
18 additions
and
18 deletions
+18
-18
app/services/audit_event_service.rb
app/services/audit_event_service.rb
+7
-8
ee/app/services/ee/audit_event_service.rb
ee/app/services/ee/audit_event_service.rb
+11
-10
No files found.
app/services/audit_event_service.rb
View file @
f1ec3387
...
...
@@ -3,14 +3,13 @@
class
AuditEventService
# Instantiates a new service
#
# @param author [User] the user who authors the change
# @param entity [Object] an instance of either Project/Group/User type. This
# param is also used to determine at which level the audit events are
# shown.
# - Project: events are visible at Project level
# - Group: events are visible at Group level
# @param [User] author the user who authors the change
# @param [User, Project, Group] entity the scope which audit event belongs to
# This param is also used to determine the visibility of the audit event.
# - Project: events are visible at Project and Instance level
# - Group: events are visible at Group and Instance level
# - User: events are visible at Instance level
# @param
details [Hash] details to be added to
audit event
# @param
[Hash] details extra data of
audit event
#
# @return [AuditEventService]
def
initialize
(
author
,
entity
,
details
=
{})
...
...
@@ -21,7 +20,7 @@ class AuditEventService
# Builds the @details attribute for authentication
#
# This uses the @author as the target object being
chang
ed
# This uses the @author as the target object being
audit
ed
#
# @return [AuditEventService]
def
for_authentication
...
...
ee/app/services/ee/audit_event_service.rb
View file @
f1ec3387
...
...
@@ -7,7 +7,8 @@ module EE
# Builds the @details attribute for member
#
# @param member [Member] the member whom is changed
# @param [Member] member object being audited
#
# @return [AuditEventService]
def
for_member
(
member
)
action
=
@details
[
:action
]
...
...
@@ -66,7 +67,7 @@ module EE
# This expects [String] :action of :destroy, :create, :update to be
# specified in @details attribute
#
# @param
group_link [ProjectGroupLink] the project group link being chang
ed
# @param
[ProjectGroupLink] group_link object being audit
ed
#
# @return [AuditEventService]
def
for_project_group_link
(
group_link
)
...
...
@@ -129,8 +130,8 @@ module EE
# Creates an event record in DB
#
# @return [
nil] if audit events is not enabled
#
@return [SecurityEvent] if record is persist
ed
# @return [
SecurityEvent, nil] if record is persisted or nil if audit events
#
features are not enabl
ed
def
unauth_security_event
return
unless
audit_events_enabled?
...
...
@@ -147,11 +148,11 @@ module EE
# Builds the @details attribute for user
#
# This uses the [User] @entity as the target object being
chang
ed
# This uses the [User] @entity as the target object being
audit
ed
#
# @param
full_path [String]
required if it is different from the User model
# in @entity. This is for backward compatability and
this parameter will
#
be dropped after
all of these incorrect usages are removed.
# @param
[String] full_path
required if it is different from the User model
# in @entity. This is for backward compatability and
will be dropped after
# all of these incorrect usages are removed.
#
# @return [AuditEventService]
def
for_user
(
full_path
=
@entity
.
full_path
)
...
...
@@ -160,7 +161,7 @@ module EE
# Builds the @details attribute for project
#
# This uses the [Project] @entity as the target object being
chang
ed
# This uses the [Project] @entity as the target object being
audit
ed
#
# @return [AuditEventService]
def
for_project
...
...
@@ -169,7 +170,7 @@ module EE
# Builds the @details attribute for group
#
# This uses the [Group] @entity as the target object being
chang
ed
# This uses the [Group] @entity as the target object being
audit
ed
#
# @return [AuditEventService]
def
for_group
...
...
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