Commit 85443aec authored by Stan Hu's avatar Stan Hu

Fix GitLab Pages deployments not working

The deployment of
https://gitlab.com/gitlab-org/gitlab/merge_requests/20154 broke new
deployments of GitLab Pages. The call to
`project.feature_available?(:pages_size_limit)` failed with this error:

```
Use `License.feature_available?` for features that cannot be
restricted to only a subset of projects or namespaces
```

Since `GLOBAL_FEATURES` includes `pages_size_limit`, we must call
`License.feature_available?(:pages_size_limit)` instead to be consistent
with `EE::GlobalPolicy`.

Closes https://gitlab.com/gitlab-org/gitlab/issues/12166
parent 7cfd6dac
......@@ -5,7 +5,7 @@ module EE::Projects::UpdatePagesService
override :max_size_from_settings
def max_size_from_settings
return super unless project.feature_available?(:pages_size_limit)
return super unless License.feature_available?(:pages_size_limit)
project.closest_setting(:max_pages_size).megabytes
end
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment