Skip to content

Don't show "close" (or "delete") links to people who can't use them #299

@cellio

Description

@cellio

https://meta.codidact.com/questions/279268

I can't remember if this is already covered on the abilities branch, but I don't think so -- I think that's about who can use those privs but didn't change the UI. If I'm wrong, let me know.

We currently show the "close" link to all users, and users who can't vote to close get a 403 if they try. That's not good, especially since we don't even give a meaningful message like "Sorry, but you don't have the 'close' privilege yet" -- we just say "failed", leading the user to think it could be a transient problem.

We shouldn't show close and delete options to people who can't use them. If we move them onto the Tools menu (which I've proposed elsewhere), we could plug into the same logic that governs which options are shown on that menu -- I think that's already sensitive to privileges (correct me if I'm wrong).

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions