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
e65dc7e3
Commit
e65dc7e3
authored
Feb 25, 2020
by
Vladimir Shushlin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Allow 0 for project/namespace max_pages_size as infinity
parent
681b47de
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
12 additions
and
6 deletions
+12
-6
changelogs/unreleased/199422-maximum-size-for-gitlab-pages-says-to-set-it-to-0-for-unlimited-bu.yml
...for-gitlab-pages-says-to-set-it-to-0-for-unlimited-bu.yml
+6
-0
ee/app/models/ee/namespace.rb
ee/app/models/ee/namespace.rb
+1
-1
ee/app/models/ee/project.rb
ee/app/models/ee/project.rb
+1
-1
ee/spec/models/namespace_spec.rb
ee/spec/models/namespace_spec.rb
+2
-2
ee/spec/models/project_spec.rb
ee/spec/models/project_spec.rb
+2
-2
No files found.
changelogs/unreleased/199422-maximum-size-for-gitlab-pages-says-to-set-it-to-0-for-unlimited-bu.yml
0 → 100644
View file @
e65dc7e3
---
title
:
Allow 0 to be set for pages maximum size per project/group to indicate unlimited
size
merge_request
:
25677
author
:
type
:
fixed
ee/app/models/ee/namespace.rb
View file @
e65dc7e3
...
...
@@ -67,7 +67,7 @@ module EE
validate
:validate_shared_runner_minutes_support
validates
:max_pages_size
,
numericality:
{
only_integer:
true
,
greater_than:
0
,
allow_nil:
true
,
numericality:
{
only_integer:
true
,
greater_than
_or_equal_to
:
0
,
allow_nil:
true
,
less_than:
::
Gitlab
::
Pages
::
MAX_SIZE
/
1
.
megabyte
}
delegate
:trial?
,
:trial_ends_on
,
:trial_starts_on
,
:upgradable?
,
to: :gitlab_subscription
,
allow_nil:
true
...
...
ee/app/models/ee/project.rb
View file @
e65dc7e3
...
...
@@ -162,7 +162,7 @@ module EE
validates
:repository_size_limit
,
numericality:
{
only_integer:
true
,
greater_than_or_equal_to:
0
,
allow_nil:
true
}
validates
:max_pages_size
,
numericality:
{
only_integer:
true
,
greater_than:
0
,
allow_nil:
true
,
numericality:
{
only_integer:
true
,
greater_than
_or_equal_to
:
0
,
allow_nil:
true
,
less_than:
::
Gitlab
::
Pages
::
MAX_SIZE
/
1
.
megabyte
}
validates
:approvals_before_merge
,
numericality:
true
,
allow_blank:
true
...
...
ee/spec/models/namespace_spec.rb
View file @
e65dc7e3
...
...
@@ -98,8 +98,8 @@ describe Namespace do
end
context
'validation'
do
it
do
is_expected
.
to
validate_numericality_of
(
:max_pages_size
).
only_integer
.
is_greater_than
(
0
)
it
"ensures max_pages_size is an integer greater than 0 (or equal to 0 to indicate unlimited/maximum)"
do
is_expected
.
to
validate_numericality_of
(
:max_pages_size
).
only_integer
.
is_greater_than
_or_equal_to
(
0
)
.
is_less_than
(
::
Gitlab
::
Pages
::
MAX_SIZE
/
1
.
megabyte
)
end
end
...
...
ee/spec/models/project_spec.rb
View file @
e65dc7e3
...
...
@@ -206,8 +206,8 @@ describe Project do
it
{
expect
(
project
).
to
be_valid
}
end
it
do
is_expected
.
to
validate_numericality_of
(
:max_pages_size
).
only_integer
.
is_greater_than
(
0
)
it
"ensures max_pages_size is an integer greater than 0 (or equal to 0 to indicate unlimited/maximum)"
do
is_expected
.
to
validate_numericality_of
(
:max_pages_size
).
only_integer
.
is_greater_than
_or_equal_to
(
0
)
.
is_less_than
(
::
Gitlab
::
Pages
::
MAX_SIZE
/
1
.
megabyte
)
end
end
...
...
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