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
6e71401d
Commit
6e71401d
authored
Aug 18, 2020
by
Matija Čupić
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Check variable entity audit_events
parent
f2ce671b
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
7 additions
and
7 deletions
+7
-7
ee/app/services/ci/audit_variable_change_service.rb
ee/app/services/ci/audit_variable_change_service.rb
+1
-1
ee/spec/controllers/ee/projects/variables_controller_spec.rb
ee/spec/controllers/ee/projects/variables_controller_spec.rb
+1
-1
ee/spec/requests/api/variables_spec.rb
ee/spec/requests/api/variables_spec.rb
+1
-1
ee/spec/services/ci/audit_variable_change_service_spec.rb
ee/spec/services/ci/audit_variable_change_service_spec.rb
+4
-4
No files found.
ee/app/services/ci/audit_variable_change_service.rb
View file @
6e71401d
...
...
@@ -5,7 +5,7 @@ module Ci
include
::
Audit
::
Changes
def
execute
return
unless
License
.
feature_available?
(
:extended_
audit_events
)
return
unless
container
.
feature_available?
(
:
audit_events
)
case
params
[
:action
]
when
:create
,
:destroy
...
...
ee/spec/controllers/ee/projects/variables_controller_spec.rb
View file @
6e71401d
...
...
@@ -23,7 +23,7 @@ RSpec.describe Projects::VariablesController do
end
before
do
stub_licensed_features
(
extended_
audit_events:
true
)
stub_licensed_features
(
audit_events:
true
)
end
context
'when creating variable'
do
...
...
ee/spec/requests/api/variables_spec.rb
View file @
6e71401d
...
...
@@ -9,7 +9,7 @@ RSpec.describe API::Variables do
before
do
project
.
add_maintainer
(
user
)
stub_licensed_features
(
extended_
audit_events:
true
)
stub_licensed_features
(
audit_events:
true
)
end
describe
'POST /projects/:id/variables'
do
...
...
ee/spec/services/ci/audit_variable_change_service_spec.rb
View file @
6e71401d
...
...
@@ -20,9 +20,9 @@ RSpec.describe Ci::AuditVariableChangeService do
group
.
variables
<<
variable
end
context
'when
extended
audits are available'
do
context
'when audits are available'
do
before
do
stub_licensed_features
(
extended_
audit_events:
true
)
stub_licensed_features
(
audit_events:
true
)
end
context
'when creating variable'
do
...
...
@@ -81,9 +81,9 @@ RSpec.describe Ci::AuditVariableChangeService do
end
end
context
'when
extended
audits are not available'
do
context
'when audits are not available'
do
before
do
stub_licensed_features
(
extended_
audit_events:
false
)
stub_licensed_features
(
audit_events:
false
)
end
context
'when creating variable'
do
...
...
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