[PR #4849] [MERGED] Do not autocreate directory for new users/orgs (#4828) #17520

Closed
opened 2025-11-02 13:51:15 -06:00 by GiteaMirror · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/go-gitea/gitea/pull/4849
Author: @SagePtr
Created: 9/2/2018
Status: Merged
Merged: 9/7/2018
Merged by: @techknowlogick

Base: masterHead: issue4828


📝 Commits (2)

  • 7a0eac4 Do not autocreate directory for new user/orgs (#4828)
  • 3ccf701 Merge branch 'master' into issue4828

📊 Changes

2 files changed (+6 additions, -7 deletions)

View changed files

📝 models/org.go (+0 -4)
📝 models/user.go (+6 -3)

📄 Description

Fixes #4828

Solves problem when user is created externally and his directory doesn't belong to same user as gitea is run under. Any new repository operations (create, fork, clone, transfer to new owner) autocreates this directory when it's needed with os.MkdirAll function (it was in the code before, only ChangeUserName function was assuming user dir does exist, now it just ignores if not).


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/go-gitea/gitea/pull/4849 **Author:** [@SagePtr](https://github.com/SagePtr) **Created:** 9/2/2018 **Status:** ✅ Merged **Merged:** 9/7/2018 **Merged by:** [@techknowlogick](https://github.com/techknowlogick) **Base:** `master` ← **Head:** `issue4828` --- ### 📝 Commits (2) - [`7a0eac4`](https://github.com/go-gitea/gitea/commit/7a0eac4c7e8371f314f790a732ddc65e2329b92b) Do not autocreate directory for new user/orgs (#4828) - [`3ccf701`](https://github.com/go-gitea/gitea/commit/3ccf7018ae276b4b928e53a574f9e96851c4cfce) Merge branch 'master' into issue4828 ### 📊 Changes **2 files changed** (+6 additions, -7 deletions) <details> <summary>View changed files</summary> 📝 `models/org.go` (+0 -4) 📝 `models/user.go` (+6 -3) </details> ### 📄 Description Fixes #4828 Solves problem when user is created externally and his directory doesn't belong to same user as gitea is run under. Any new repository operations (create, fork, clone, transfer to new owner) autocreates this directory when it's needed with os.MkdirAll function (it was in the code before, only ChangeUserName function was assuming user dir does exist, now it just ignores if not). --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
GiteaMirror added the pull-request label 2025-11-02 13:51:15 -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#17520