Is it possible to have path-level access control via sparse-checkout and partial-clone? #7279

Open
opened 2025-11-02 07:21:36 -06:00 by GiteaMirror · 0 comments
Owner

Originally created by @Shuenhoy on GitHub (May 1, 2021).

  • Gitea version (or commit ref): 1.14
  • Git version: 2.31.1
  • Operating system:
  • Database (use [x]):
    • PostgreSQL
    • MySQL
    • MSSQL
    • SQLite
  • Can you reproduce the bug at https://try.gitea.io:
    • Yes (provide example URL)
    • No
  • Log gist:

Description

I know that git is designed to be fully distributed. However, supporting path-level access control would definitely be useful for those who meet this scenario and don't want SVN or something else.

Recently, I found that with sparse-checkout (which makes git only checkout some sub-dirs) and partial-clone (which makes git only request for the blob objects that are checked out), users can actually only keep a part of the repo while committing or pushing to the remote repo.

So I guess if there could be some checking logic in the server that only sending the object of files whose
parent directory's access permission is granted to the user, we could have path-level access control?

Originally created by @Shuenhoy on GitHub (May 1, 2021). - Gitea version (or commit ref): 1.14 - Git version: 2.31.1 - Operating system: - Database (use `[x]`): - [ ] PostgreSQL - [ ] MySQL - [ ] MSSQL - [ ] SQLite - Can you reproduce the bug at https://try.gitea.io: - [ ] Yes (provide example URL) - [ ] No - Log gist: ## Description I know that git is designed to be fully distributed. However, supporting path-level access control would definitely be useful for those who meet this scenario and don't want SVN or something else. Recently, I found that with sparse-checkout (which makes git only checkout some sub-dirs) and partial-clone (which makes git only request for the blob objects that are checked out), users can actually only keep a part of the repo while committing or pushing to the remote repo. So I guess if there could be some checking logic in the server that only sending the object of files whose parent directory's access permission is granted to the user, we could have path-level access control?
GiteaMirror added the type/proposal label 2025-11-02 07:21:36 -06:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/gitea#7279