Skip to content

Update New Snippet buttons.

username-removed-386624 requested to merge new-snippet-button-permissions into master

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 (closed).

Screenshots (if relevant)

Before:

before1

before2

After:

after1

after2

after3

after4

after5

after6

Does this MR meet the acceptance criteria?

Merge request reports

Loading