mirror of
https://github.com/freedombox/FreedomBox.git
synced 2026-11-29 08:25:10 +00:00
gitweb: Run git commands as a web user
Fixes #2306. Tested that all the gitweb tests pass in Debian stable and testing containers. Signed-off-by: Veiko Aasa <veiko17@disroot.org> Reviewed-by: Sunil Mohan Adapa <sunil@medhas.org>
This commit is contained in:
1 parent
d3d7e233e3
commit
b94e1ea596
4 files changed
+14
-9
No files matched your search
@@ -14,11 +14,12 @@ from django.utils.translation import gettext_lazy as _
|
||||
from plinth.modules import gitweb
|
||||
|
||||
from . import privileged
|
||||
from .manifest import REPO_DIR_OWNER
|
||||
|
||||
|
||||
def _get_branches(repo):
|
||||
"""Get all the branches in the repository."""
|
||||
branch_data = privileged.get_branches(repo)
|
||||
branch_data = privileged.get_branches(repo, _run_as_user=REPO_DIR_OWNER)
|
||||
default_branch = branch_data['default_branch']
|
||||
branches = branch_data['branches']
|
||||
|
||||
|
||||
Reference in new issue
Block a user