BigW Consortium Gitlab
Update New Snippet buttons. ## What does this MR do? No longer shows New Snippet button to users who aren't able to create a new snippet in the given context. Also removes the plus icon from the New Snippet buttons, as they're no longer used in other creation buttons. ## Are there points in the code the reviewer needs to double check? Make sure the snippets pages don't break or show the buttons to users who shouldn't have access to them. ## Why was this MR needed? Users that weren't logged in would click the New Snippet button and get a 404 error. You would also get 404 errors from the New Snippet button on project snippets for projects you weren't able to create snippets for. ## What are the relevant issue numbers? Fixes #14595. ## Screenshots (if relevant) Before: ![before1](/uploads/2c222cd981332d30772054cefadafa28/before1.png) ![before2](/uploads/2734f8a84ae293b08dd982f2ed7da028/before2.png) After: ![after1](/uploads/c84aa9aec17056095271b0f24c6e9b5b/after1.png) ![after2](/uploads/70fe37ad7be5054bf20439ca0a1f5ccc/after2.png) ![after3](/uploads/afcd435c211482e9df25cb8971f1e65e/after3.png) ![after4](/uploads/9eab87440aae4991b508373ff36e3c7a/after4.png) ![after5](/uploads/f5ec167cb3e1115d3b3a43bd5231bc60/after5.png) ![after6](/uploads/c774cbb1f9babe3382ff69af7060b9c5/after6.png) ## Does this MR meet the acceptance criteria? - [x] [CHANGELOG](https://gitlab.com/gitlab-org/gitlab-ce/blob/master/CHANGELOG) entry added - Tests - [x] Added for this feature/bug - [x] All builds are passing - [x] Conform by the [style guides](https://gitlab.com/gitlab-org/gitlab-ce/blob/master/CONTRIBUTING.md#style-guides) - [x] Branch has no merge conflicts with `master` (if you do - rebase it please) - [x] [Squashed related commits together](https://git-scm.com/book/en/Git-Tools-Rewriting-History#Squashing-Commits) See merge request !4998
Name |
Last commit
|
Last update |
---|---|---|
.github | Loading commit data... | |
app | Loading commit data... | |
bin | Loading commit data... | |
builds | Loading commit data... | |
config | Loading commit data... | |
db | Loading commit data... | |
doc | Loading commit data... | |
docker | Loading commit data... | |
features | Loading commit data... | |
fixtures/emojis | Loading commit data... | |
generator_templates/active_record/migration | Loading commit data... | |
lib | Loading commit data... | |
log | Loading commit data... | |
public | Loading commit data... | |
rubocop | Loading commit data... | |
scripts | Loading commit data... | |
shared | Loading commit data... | |
spec | Loading commit data... | |
tmp | Loading commit data... | |
vendor | Loading commit data... | |
.csscomb.json | Loading commit data... | |
.flayignore | Loading commit data... | |
.foreman | Loading commit data... | |
.gitattributes | Loading commit data... | |
.gitignore | Loading commit data... | |
.gitlab-ci.yml | Loading commit data... | |
.hound.yml | Loading commit data... | |
.pkgr.yml | Loading commit data... | |
.rspec | Loading commit data... | |
.rubocop.yml | Loading commit data... | |
.ruby-version | Loading commit data... | |
.scss-lint.yml | Loading commit data... | |
.simplecov | Loading commit data... | |
.teatro.yml | Loading commit data... | |
.vagrant_enabled | Loading commit data... | |
CHANGELOG | Loading commit data... | |
CONTRIBUTING.md | Loading commit data... | |
GITLAB_SHELL_VERSION | Loading commit data... | |
GITLAB_WORKHORSE_VERSION | Loading commit data... | |
Gemfile | Loading commit data... | |
Gemfile.lock | Loading commit data... | |
LICENSE | Loading commit data... | |
MAINTENANCE.md | Loading commit data... | |
PROCESS.md | Loading commit data... | |
Procfile | Loading commit data... | |
README.md | Loading commit data... | |
Rakefile | Loading commit data... | |
VERSION | Loading commit data... | |
config.ru | Loading commit data... | |
doc_styleguide.md | Loading commit data... | |
docker-compose.yml | Loading commit data... |