Add option to disable the web editor #1743

Closed
opened 2025-11-02 04:11:56 -06:00 by GiteaMirror · 16 comments
Owner

Originally created by @rikvdh on GitHub (Apr 30, 2018).

  • Gitea version (or commit ref): latest
  • Git version: n/a
  • Operating system: n/a
  • Database (use [x]): n/a
  • Can you reproduce the bug at https://try.gitea.io: n/a
  • Log gist: n/a

Description

Currently the web-editor can not be disabled in the configuration. For some use-cases it is desirable to disable the web-editor.

Originally created by @rikvdh on GitHub (Apr 30, 2018). - Gitea version (or commit ref): latest - Git version: n/a - Operating system: n/a - Database (use `[x]`): n/a - Can you reproduce the bug at https://try.gitea.io: n/a - Log gist: n/a ## Description Currently the web-editor can not be disabled in the configuration. For some use-cases it is desirable to disable the web-editor.
GiteaMirror added the type/proposalreviewed/wontfix labels 2025-11-02 04:11:56 -06:00
Author
Owner

@bkcsoft commented on GitHub (May 1, 2018):

Care to elaborate on what kind of use cases those would be? If you don't want to use a feature, don't use it.

@bkcsoft commented on GitHub (May 1, 2018): Care to elaborate on what kind of use cases those would be? If you don't want to use a feature, don't use it.
Author
Owner

@rikvdh commented on GitHub (May 1, 2018):

We are using Gitea within our organisation where we use Git-flow. To use Git-flow correctly we can't protect master/develop. But we want to prevent users making changes in these branches without the correct procedure. I cant prevent 10 developers to 'dont use' the web-editor and play police-officer all day. I want to disable it, and only allow source-code modifications through SSH.

I hope that clarifies my situation. :-)

@rikvdh commented on GitHub (May 1, 2018): We are using Gitea within our organisation where we use Git-flow. To use Git-flow correctly we can't protect master/develop. But we want to prevent users making changes in these branches without the correct procedure. I cant prevent 10 developers to 'dont use' the web-editor and play police-officer all day. I want to disable it, and only allow source-code modifications through SSH. I hope that clarifies my situation. :-)
Author
Owner

@jhasse commented on GitHub (May 4, 2018):

How can you prevent the developers from pushing the changes via SSH that they made in the web-editor?

@jhasse commented on GitHub (May 4, 2018): How can you prevent the developers from pushing the changes via SSH that they made in the web-editor?
Author
Owner

@seeker20 commented on GitHub (Oct 24, 2018):

We have disabled this in the code. Unfortunately, the editor does not work with some code formatting. This deletes all lines and adds all lines again.

Problem is here, when the line endings formatted with CRLF and you edit it Online.

@seeker20 commented on GitHub (Oct 24, 2018): We have disabled this in the code. Unfortunately, the editor does not work with some code formatting. This deletes all lines and adds all lines again. Problem is here, when the line endings formatted with CRLF and you edit it Online.
Author
Owner

@lafriks commented on GitHub (Oct 30, 2018):

I would prefer that problems are fixed than adding option to disable something just because of it.

@rikvdh is this problem sill actual for you as branches can be protected now?

@lafriks commented on GitHub (Oct 30, 2018): I would prefer that problems are fixed than adding option to disable something just because of it. @rikvdh is this problem sill actual for you as branches can be protected now?
Author
Owner

@rikvdh commented on GitHub (Oct 31, 2018):

@lafriks Unfortunately we are not able to protect branches due to the way we work. We want to disable the web-editor to prevent users to make changes by mistake in the wrong branches.

@rikvdh commented on GitHub (Oct 31, 2018): @lafriks Unfortunately we are not able to protect branches due to the way we work. We want to disable the web-editor to prevent users to make changes by mistake in the wrong branches.
Author
Owner

@lafriks commented on GitHub (Nov 1, 2018):

@rikvdh how that would be different than from pushing changes to wrong branch?

@lafriks commented on GitHub (Nov 1, 2018): @rikvdh how that would be different than from pushing changes to wrong branch?
Author
Owner

@br-aw commented on GitHub (Jul 2, 2019):

We need to disable the web editor, when someone clicks into it, it changes all 1000 lines and we can't reconcile this. Seems to be related to breaking the newlines.

@br-aw commented on GitHub (Jul 2, 2019): We need to disable the web editor, when someone clicks into it, it changes all 1000 lines and we can't reconcile this. Seems to be related to breaking the newlines.
Author
Owner

@lunny commented on GitHub (Jul 3, 2019):

Just like @lafriks said. This should be a bug of web editor we should fix it. But since web editor has the same permission control as SSH push. I don't think it's necessary to disable it.

@lunny commented on GitHub (Jul 3, 2019): Just like @lafriks said. This should be a bug of web editor we should fix it. But since web editor has the same permission control as SSH push. I don't think it's necessary to disable it.
Author
Owner

@lunny commented on GitHub (Jul 3, 2019):

Please send another issue to report a bug so that someone could fix it.

@lunny commented on GitHub (Jul 3, 2019): Please send another issue to report a bug so that someone could fix it.
Author
Owner

@JoshDreamland commented on GitHub (Jul 5, 2019):

Another reason to disable the editor is because every single commit triggers our CI, and the editor only allows editing one file at a time. We have one contributor in particular who will edit files one at a time in his PR, spawning a separate CI instance for every file he touches, committing the same change to a half dozen files, one file at a time. I feel horrible about the sheer amount of compute power we completely waste on his behalf.

The latest PR I merged from this contributor changed five files, adding 62 lines and removing 27. In addition to his initial commit were forty-nine others, each made from the GitHub editor. He queued 2,250 jobs on Travis and another 900 on AppVeyor, burning three hundred core hours, all without a thought, by clicking buttons in the GitHub UI.

Note that we're open-source and don't pay for this service. We cost Travis some $15, today, and AppVeyor some $6, assuming their infrastructure scales well. I've asked this contributor in the past and will ask him again to stop doing this. But GitHub makes this so easy, I'm sure this is happening everywhere.

@JoshDreamland commented on GitHub (Jul 5, 2019): Another reason to disable the editor is because every single commit triggers our CI, and the editor only allows editing one file at a time. We have one contributor in particular who will edit files one at a time in his PR, spawning a separate CI instance for every file he touches, committing the same change to a half dozen files, one file at a time. I feel horrible about the sheer amount of compute power we completely waste on his behalf. The latest PR I merged from this contributor changed five files, adding 62 lines and removing 27. In addition to his initial commit were forty-nine others, each made from the GitHub editor. He queued 2,250 jobs on Travis and another 900 on AppVeyor, burning *three hundred core hours*, all without a thought, by clicking buttons in the GitHub UI. Note that we're open-source and don't pay for this service. We cost Travis some $15, today, and AppVeyor some $6, assuming their infrastructure scales well. I've asked this contributor in the past and will ask him again to stop doing this. But GitHub makes this so easy, I'm sure this is happening *everywhere*.
Author
Owner

@lunny commented on GitHub (Jul 6, 2019):

So maybe you mean gitea should support multiple files on web editor? :) but not disable it.

@lunny commented on GitHub (Jul 6, 2019): So maybe you mean gitea should support multiple files on web editor? :) but not disable it.
Author
Owner

@bleonard252 commented on GitHub (Jul 29, 2019):

I would personally like to see something like GitLab's web IDE in Gitea.

@bleonard252 commented on GitHub (Jul 29, 2019): I would personally like to see something like GitLab's web IDE in Gitea.
Author
Owner

@timurkelin commented on GitHub (Jan 8, 2020):

using web editor can break the flow which involves git hooks

@timurkelin commented on GitHub (Jan 8, 2020): using web editor can break the flow which involves git hooks
Author
Owner

@guillep2k commented on GitHub (Jan 8, 2020):

To disable the web editor (i.e the pencil icon to edit files online) you could edit Gitea templates and leave them out. Or probably much easier to maintain, add a custom CSS to make:

.octicon-pencil, .octicon-trashcan { display: none; }

I'm sure there's better selectors for that, but those should at least hide the icons for editing/deleting.

@guillep2k commented on GitHub (Jan 8, 2020): To disable the web editor (i.e the pencil icon to edit files online) you could edit Gitea templates and leave them out. Or probably much easier to maintain, add a custom CSS to make: ```css .octicon-pencil, .octicon-trashcan { display: none; } ``` I'm sure there's better selectors for that, but those should at least hide the icons for editing/deleting.
Author
Owner

@guillep2k commented on GitHub (Jan 8, 2020):

Another reason to disable the editor is because every single commit triggers our CI, and the editor only allows editing one file at a time. We have one contributor in particular who will edit files one at a time in his PR, spawning a separate CI instance for every file he touches, committing the same change to a half dozen files, one file at a time. I feel horrible about the sheer amount of compute power we completely waste on his behalf.

With code change suggestions (which we wish to implement in the future) this too will be a problem for you. I don't know if it's easy enough, but I'd configure my CI to kill any previous instances dealing with the same repo/branch when a new one appears. Still some useless work will be done, but it won't be so bad.

@guillep2k commented on GitHub (Jan 8, 2020): > > > Another reason to disable the editor is because every single commit triggers our CI, and the editor only allows editing one file at a time. We have one contributor in particular who will edit files one at a time in his PR, spawning a separate CI instance for every file he touches, committing the same change to a half dozen files, one file at a time. I feel horrible about the sheer amount of compute power we completely waste on his behalf. > With code change suggestions (which we wish to implement in the future) this too will be a problem for you. I don't know if it's easy enough, but I'd configure my CI to kill any previous instances dealing with the same repo/branch when a new one appears. Still some useless work will be done, but it won't be so bad.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/gitea#1743