forked from forgejo/forgejo
Move access and repo permission to models/perm/access (#19350)
* Move access and repo permission to models/perm/access * Remove unnecessary code
This commit is contained in:
parent
8e8e936ada
commit
cbd45471b1
72 changed files with 608 additions and 511 deletions
|
@ -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},
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue