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
23b28e68
Commit
23b28e68
authored
Oct 27, 2021
by
Marcos Rocha
Committed by
James Fargher
Oct 27, 2021
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Annotate DAST Service object strings for localization
parent
b05150f7
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
25 additions
and
10 deletions
+25
-10
ee/app/services/app_sec/dast/profiles/build_config_service.rb
...pp/services/app_sec/dast/profiles/build_config_service.rb
+2
-2
ee/app/services/app_sec/dast/profiles/create_service.rb
ee/app/services/app_sec/dast/profiles/create_service.rb
+2
-2
ee/app/services/app_sec/dast/profiles/destroy_service.rb
ee/app/services/app_sec/dast/profiles/destroy_service.rb
+4
-4
ee/app/services/app_sec/dast/profiles/update_service.rb
ee/app/services/app_sec/dast/profiles/update_service.rb
+2
-2
locale/gitlab.pot
locale/gitlab.pot
+15
-0
No files found.
ee/app/services/app_sec/dast/profiles/build_config_service.rb
View file @
23b28e68
...
...
@@ -5,7 +5,7 @@ module AppSec
module
Profiles
class
BuildConfigService
<
BaseProjectService
def
execute
return
ServiceResponse
.
error
(
message:
'Insufficient permissions for dast_configuration keyword'
)
unless
allowed?
return
ServiceResponse
.
error
(
message:
_
(
'Insufficient permissions for dast_configuration keyword'
)
)
unless
allowed?
build_config
=
{
dast_site_profile:
site_profile
,
dast_scanner_profile:
scanner_profile
}
...
...
@@ -42,7 +42,7 @@ module AppSec
profile
=
yield
(
name
).
execute
.
first
unless
can?
(
current_user
,
:read_on_demand_dast_scan
,
profile
)
errors
.
push
(
"DAST profile not found:
#{
name
}
"
)
errors
.
push
(
_
(
'DAST profile not found: %{name}'
)
%
{
name:
name
}
)
return
end
...
...
ee/app/services/app_sec/dast/profiles/create_service.rb
View file @
23b28e68
...
...
@@ -5,7 +5,7 @@ module AppSec
module
Profiles
class
CreateService
<
BaseContainerService
def
execute
return
ServiceResponse
.
error
(
message:
'Insufficient permissions'
)
unless
allowed?
return
ServiceResponse
.
error
(
message:
_
(
'Insufficient permissions'
)
)
unless
allowed?
ApplicationRecord
.
transaction
do
@dast_profile
=
create_profile
...
...
@@ -89,7 +89,7 @@ module AppSec
author:
current_user
,
scope:
container
,
target:
dast_profile
,
message:
"Added DAST profile"
message:
'Added DAST profile'
)
if
schedule
...
...
ee/app/services/app_sec/dast/profiles/destroy_service.rb
View file @
23b28e68
...
...
@@ -6,8 +6,8 @@ module AppSec
class
DestroyService
<
BaseContainerService
def
execute
return
unauthorized
unless
allowed?
return
ServiceResponse
.
error
(
message:
'Profile parameter missing'
)
unless
dast_profile
return
ServiceResponse
.
error
(
message:
'Profile failed to delete'
)
unless
dast_profile
.
destroy
return
ServiceResponse
.
error
(
message:
_
(
'Profile parameter missing'
)
)
unless
dast_profile
return
ServiceResponse
.
error
(
message:
_
(
'Profile failed to delete'
)
)
unless
dast_profile
.
destroy
create_audit_event
...
...
@@ -22,7 +22,7 @@ module AppSec
def
unauthorized
ServiceResponse
.
error
(
message:
'You are not authorized to update this profile'
,
message:
_
(
'You are not authorized to update this profile'
)
,
http_status:
403
)
end
...
...
@@ -37,7 +37,7 @@ module AppSec
author:
current_user
,
scope:
container
,
target:
dast_profile
,
message:
"Removed DAST profile"
message:
'Removed DAST profile'
)
end
end
...
...
ee/app/services/app_sec/dast/profiles/update_service.rb
View file @
23b28e68
...
...
@@ -8,7 +8,7 @@ module AppSec
def
execute
return
unauthorized
unless
allowed?
return
error
(
'Profile parameter missing'
)
unless
dast_profile
return
error
(
_
(
'Profile parameter missing'
)
)
unless
dast_profile
build_auditors!
...
...
@@ -79,7 +79,7 @@ module AppSec
end
def
unauthorized
error
(
'You are not authorized to update this profile'
,
http_status:
403
)
error
(
_
(
'You are not authorized to update this profile'
)
,
http_status:
403
)
end
def
dast_profile
...
...
locale/gitlab.pot
View file @
23b28e68
...
...
@@ -10304,6 +10304,9 @@ msgstr ""
msgid "DAST Scans"
msgstr ""
msgid "DAST profile not found: %{name}"
msgstr ""
msgid "DNS"
msgstr ""
...
...
@@ -18308,6 +18311,9 @@ msgstr ""
msgid "Insufficient permissions"
msgstr ""
msgid "Insufficient permissions for dast_configuration keyword"
msgstr ""
msgid "Integration"
msgstr ""
...
...
@@ -26080,12 +26086,18 @@ msgstr ""
msgid "Profile Settings"
msgstr ""
msgid "Profile failed to delete"
msgstr ""
msgid "Profile image guideline"
msgstr ""
msgid "Profile page:"
msgstr ""
msgid "Profile parameter missing"
msgstr ""
msgid "ProfileSession|on"
msgstr ""
...
...
@@ -38931,6 +38943,9 @@ msgstr ""
msgid "You are not authorized to perform this action"
msgstr ""
msgid "You are not authorized to update this profile"
msgstr ""
msgid "You are not authorized to update this scanner profile"
msgstr ""
...
...
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