diff options
author | Lunny Xiao <xiaolunwen@gmail.com> | 2022-05-11 18:09:36 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-05-11 12:09:36 +0200 |
commit | cbd45471b1100bffcd2f18719b56a5da5468756b (patch) | |
tree | 11fcb818fd4e9d7b6bdb97d1b5bfbe2ed3df5747 /models/user.go | |
parent | 8e8e936adacea873013b89d534f60207e67f2b05 (diff) | |
download | gitea-cbd45471b1100bffcd2f18719b56a5da5468756b.tar.gz gitea-cbd45471b1100bffcd2f18719b56a5da5468756b.zip |
Move access and repo permission to models/perm/access (#19350)
* Move access and repo permission to models/perm/access
* Remove unnecessary code
Diffstat (limited to 'models/user.go')
-rw-r--r-- | models/user.go | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/models/user.go b/models/user.go index 11234a881d..e805c746cb 100644 --- a/models/user.go +++ b/models/user.go @@ -16,6 +16,7 @@ import ( "code.gitea.io/gitea/models/db" "code.gitea.io/gitea/models/issues" "code.gitea.io/gitea/models/organization" + access_model "code.gitea.io/gitea/models/perm/access" pull_model "code.gitea.io/gitea/models/pull" repo_model "code.gitea.io/gitea/models/repo" user_model "code.gitea.io/gitea/models/user" @@ -68,8 +69,8 @@ func DeleteUser(ctx context.Context, u *user_model.User) (err error) { if err = db.DeleteBeans(ctx, &AccessToken{UID: u.ID}, - &Collaboration{UserID: u.ID}, - &Access{UserID: u.ID}, + &repo_model.Collaboration{UserID: u.ID}, + &access_model.Access{UserID: u.ID}, &repo_model.Watch{UserID: u.ID}, &repo_model.Star{UID: u.ID}, &user_model.Follow{UserID: u.ID}, @@ -80,7 +81,6 @@ func DeleteUser(ctx context.Context, u *user_model.User) (err error) { &user_model.UserOpenID{UID: u.ID}, &issues.Reaction{UserID: u.ID}, &organization.TeamUser{UID: u.ID}, - &Collaboration{UserID: u.ID}, &Stopwatch{UserID: u.ID}, &user_model.Setting{UserID: u.ID}, &pull_model.AutoMerge{DoerID: u.ID}, |