[go: up one dir, main page]

Skip to content

don't tell anonymous users how to enable designs-upload

Summary

browsing any issue on a self-hosted gitlab instance that happens to not have hashed storage nor LFS enabled shows the following warning:

To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information

the problem i'm having is, that this information is presented to people who cannot do anything about it:

  • project members
  • site users
  • anonymous (not logged-in) users

only project owners/maintainers (rather than ordinary "members") can enable LFS for a given project. asking an admin to "enable hashed storage" requires knowing how to contact an admin: how would an ordinary anonymous user know that?

Steps to reproduce

  • make sure your project doesn't have LFS enabled
  • create a new ticket

Example Project

i've just created an example ticket in my testing repository that shows the problem:

umlaeute/testing#1

What is the current bug behavior?

below the ticket's top post there is a box saying:

To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information

This is displayed for everybody, regardless of their role (or login state).

What is the expected correct behavior?

first: the information should only be shown to people for whom it matters. anonymous cannot upload anything, simply because they do not have the permissions to do so. anabling LFS and hashed storage will still not allow them to upload any design.

second: the information should only be shown to people who can do anything about it. in this case, only users with the permissions to "enable LFS" for the project should see the alert. (this rules out anonymous users, non-project members and junior project members)

third: the alert should only display the info that is relevant. E.g. i'm pretty sure that gitlab.com already has "enabled hashed storage". still the alert tells me to contact an admin (sidenote: who are the admins of gitlab.com?) to enable just that.

So I would expect that:

  • anonymous users never see the alert

  • users with permissions to report to the issue tracker will not get the alert either. however, they might get a notice saying:

    Uploading designs is currently disabled.

    (though I'd rather not; see below)

  • users with the powers to enable "design upload" should be presented with the alert.

    • the part that says "you'll need to enable LFS" should only be displayed if LFS is indeed disabled
    • the part that says "and have an admin enable hashed storage" should only be displayed if the instance doesn't have hashed storage enabled already

Relevant logs and/or screenshots

gitlab-designs

Output of checks

This bug happens on GitLab.com (but also on self hosted instances)

designs for everybody?

I've never in my life used gitlab's designs feature - which is totally fine, as i'm mostly doing backend implementations in C. Virtually all projects I participate in, do not have a need for such a feature either.

Other people's views are different, and for them the feature might be crucial. I figure that for you (the gitlab developers), the feature might be very important. You are probably also very proud of it (and rightly so).

However, since I don't care, why do I have to be shown this again and again?