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
d1e57b99
Commit
d1e57b99
authored
Jan 10, 2022
by
Matt Kasa
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixes message for 403 creating a Terraform Module package
Closes
https://gitlab.com/gitlab-org/gitlab/-/issues/330844
parent
645e82d0
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
2 additions
and
2 deletions
+2
-2
app/services/packages/terraform_module/create_package_service.rb
...vices/packages/terraform_module/create_package_service.rb
+1
-1
spec/services/packages/terraform_module/create_package_service_spec.rb
.../packages/terraform_module/create_package_service_spec.rb
+1
-1
No files found.
app/services/packages/terraform_module/create_package_service.rb
View file @
d1e57b99
...
...
@@ -7,7 +7,7 @@ module Packages
def
execute
return
error
(
'Version is empty.'
,
400
)
if
params
[
:module_version
].
blank?
return
error
(
'
Package already exists.
'
,
403
)
if
current_package_exists_elsewhere?
return
error
(
'
Access Denied
'
,
403
)
if
current_package_exists_elsewhere?
return
error
(
'Package version already exists.'
,
403
)
if
current_package_version_exists?
return
error
(
'File is too large.'
,
400
)
if
file_size_exceeded?
...
...
spec/services/packages/terraform_module/create_package_service_spec.rb
View file @
d1e57b99
...
...
@@ -37,7 +37,7 @@ RSpec.describe Packages::TerraformModule::CreatePackageService do
let!
(
:existing_package
)
{
create
(
:terraform_module_package
,
project:
project2
,
name:
'foo/bar'
,
version:
'1.0.0'
)
}
it
{
expect
(
subject
[
:http_status
]).
to
eq
403
}
it
{
expect
(
subject
[
:message
]).
to
be
'
Package already exists.
'
}
it
{
expect
(
subject
[
:message
]).
to
be
'
Access Denied
'
}
end
context
'version already exists'
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