Skip to content

Error 404 on Push Rules admin page when no license is added

Summary

"Push Rules" admin page returns error 404 when the relevant license file is not uploaded. "Geo Nodes" admin page returns a banner explaining that a license is required ("You need a different license to enable Geo Replication").

Providing a page/banner similar to the Geo Nodes license warning for Push Rules would be a better user experience.

Steps to reproduce

Install gitlab-ee without providing a license. Visit the "Push Rules" admin page.

What is the current bug behavior?

404 error received on "Push Rules" admin page when no license has been added.

What is the expected correct behavior?

Warning/info page/banner about adding a license, similar to "Geo Nodes" admin page in the same situation.

Relevant logs and/or screenshots

Screen_Shot_2018-06-23_at_01.52.02

Screen_Shot_2018-06-23_at_01.52.22

Output of checks

This happens on self-hosted GitLab 11.0 installations (in my case, using Omnibus) where no license has been uploaded.

Results of GitLab environment info

Expand for output related to GitLab environment info

System information System: Ubuntu 18.04 Proxy: no Current User: git Using RVM: no Ruby Version: 2.4.4p296 Gem Version: 2.7.6 Bundler Version:1.16.2 Rake Version: 12.3.1 Redis Version: 3.2.11 Git Version: 2.17.1 Sidekiq Version:5.1.3 Go Version: unknown

GitLab information Version: 11.0.0-ee Revision: d97d9e4b393 Directory: /opt/gitlab/embedded/service/gitlab-rails DB Adapter: postgresql DB Version: 9.6.8 URL: https://gitlab.example.com HTTP Clone URL: https://gitlab.example.com/some-group/some-project.git SSH Clone URL: git@gitlab.example.com:some-group/some-project.git Elasticsearch: no Geo: no Using LDAP: no Using Omniauth: no

GitLab Shell Version: 7.1.4 Repository storage paths:

  • default: /mnt/storage/git-data/repositories Hooks: /opt/gitlab/embedded/service/gitlab-shell/hooks Git: /opt/gitlab/embedded/bin/git

Results of GitLab application Check

Expand for output related to the GitLab application check

Checking GitLab Shell ...

GitLab Shell version >= 7.1.4 ? ... OK (7.1.4) Repo base directory exists? default... yes Repo storage directories are symlinks? default... no Repo paths owned by git:root, or git:git? default... yes Repo paths access is drwxrws---? default... yes hooks directories in repos are links: ... can't check, you have no projects Running /opt/gitlab/embedded/service/gitlab-shell/bin/check Check GitLab API access: OK Redis available via internal API: OK

Access to /var/opt/gitlab/.ssh/authorized_keys: OK gitlab-shell self-check successful

Checking GitLab Shell ... Finished

Checking Sidekiq ...

Running? ... yes Number of Sidekiq processes ... 1

Checking Sidekiq ... Finished

Checking Reply by email ...

IMAP server credentials are correct? ... yes Init.d configured correctly? ... skipped MailRoom running? ... skipped

Checking Reply by email ... Finished

Checking LDAP ...

LDAP is disabled in config/gitlab.yml

Checking LDAP ... Finished

Checking GitLab ...

Git configured correctly? ... yes Database config exists? ... yes All migrations up? ... yes Database contains orphaned GroupMembers? ... no GitLab config exists? ... yes GitLab config up to date? ... yes Log directory writable? ... yes Tmp directory writable? ... yes Uploads directory exists? ... yes Uploads directory has correct permissions? ... yes Uploads directory tmp has correct permissions? ... yes Init script exists? ... skipped (omnibus-gitlab has no init script) Init script up-to-date? ... skipped (omnibus-gitlab has no init script) Projects have namespace: ... can't check, you have no projects Redis version >= 2.8.0? ... yes Ruby version >= 2.3.5 ? ... yes (2.4.4) Git version >= 2.9.5 ? ... yes (2.17.1) Git user has default SSH configuration? ... yes Active users: ... 1 Elasticsearch version 5.1 - 5.5? ... skipped (elasticsearch is disabled)

Checking GitLab ... Finished

Possible fixes

Add a page/banner similar to the Geo Nodes admin page, for when no license is added.

Similar code checking for license/feature availability is shown in the following search: https://gitlab.com/search?utf8=%E2%9C%93&search=You+need+a+different+license+to+enable&group_id=&project_id=278964&search_code=true&repository_ref=master

A slightly different approach may be required given that the push rules page is a form which probably shouldn't be submitted without a license.

Edited by Craig Gardener