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
bb89b9c6
Commit
bb89b9c6
authored
Mar 08, 2022
by
harsimarsandhu
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Apply review suggestions
parent
1f1d3801
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
3 deletions
+3
-3
ee/app/services/approval_rules/project_rule_destroy_service.rb
...p/services/approval_rules/project_rule_destroy_service.rb
+3
-3
No files found.
ee/app/services/approval_rules/project_rule_destroy_service.rb
View file @
bb89b9c6
...
@@ -6,7 +6,7 @@ module ApprovalRules
...
@@ -6,7 +6,7 @@ module ApprovalRules
def
initialize
(
approval_rule
,
current_user
)
def
initialize
(
approval_rule
,
current_user
)
@rule
=
approval_rule
@rule
=
approval_rule
super
(
approval_rule
,
current_user
)
super
(
approval_rule
.
project
,
current_user
)
end
end
def
execute
def
execute
...
@@ -18,7 +18,7 @@ module ApprovalRules
...
@@ -18,7 +18,7 @@ module ApprovalRules
end
end
if
rule
.
destroyed?
if
rule
.
destroyed?
audit_deletion
(
rule
)
audit_deletion
success
success
else
else
error
(
rule
.
errors
.
messages
)
error
(
rule
.
errors
.
messages
)
...
@@ -34,7 +34,7 @@ module ApprovalRules
...
@@ -34,7 +34,7 @@ module ApprovalRules
.
delete_all
.
delete_all
end
end
def
audit_deletion
(
rule
)
def
audit_deletion
audit_context
=
{
audit_context
=
{
author:
current_user
,
author:
current_user
,
scope:
rule
.
project
,
scope:
rule
.
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