···5050 UserTypeIndividual UserType = iota // Historic reason to make it starts at 0.
51515252 // UserTypeOrganization defines an organization
5353- UserTypeOrganization
5353+ UserTypeOrganization // 1
54545555 // UserTypeUserReserved reserves a (non-existing) user, i.e. to prevent a spam user from re-registering after being deleted, or to reserve the name until the user is actually created later on
5656- UserTypeUserReserved
5656+ UserTypeUserReserved // 2
57575858 // UserTypeOrganizationReserved reserves a (non-existing) organization, to be used in combination with UserTypeUserReserved
5959- UserTypeOrganizationReserved
5959+ UserTypeOrganizationReserved // 3
60606161 // UserTypeBot defines a bot user
6262- UserTypeBot
6262+ UserTypeBot // 4
63636464 // UserTypeRemoteUser defines a remote user for federated users
6565- UserTypeRemoteUser
6565+ UserTypeRemoteUser // 5
6666)
67676868const (
···919919920920// GetInactiveUsers gets all inactive users
921921func GetInactiveUsers(ctx context.Context, olderThan time.Duration) ([]*User, error) {
922922- var cond builder.Cond = builder.Eq{"is_active": false}
922922+ cond := builder.And(
923923+ builder.Eq{"is_active": false},
924924+ builder.Or( // only plain user
925925+ builder.Eq{"`type`": UserTypeIndividual},
926926+ builder.Eq{"`type`": UserTypeUserReserved},
927927+ ),
928928+ )
923929924930 if olderThan > 0 {
925931 cond = cond.And(builder.Lt{"created_unix": time.Now().Add(-olderThan).Unix()})
···11+fix: [commit](https://codeberg.org/forgejo/forgejo/commit/32a91add34519ef7768ec907888ed837ad0dde2f) Fix GetInactiveUsers
22+fix: [commit](https://codeberg.org/forgejo/forgejo/commit/64824290912b6300ede2b2f95ff77d55dde9859b) Fix submodule parsing
33+fix: [commit](https://codeberg.org/forgejo/forgejo/commit/ddabba5f89c4b196daeeb2af17de9ec2cec14b63) allow the actions user to login via the jwt token
44+feat: [commit](https://codeberg.org/forgejo/forgejo/commit/262c48409b1224e3f6dc63c8d1e04fef0e0cf2c0) Support HTTP POST requests to `/userinfo`, aligning to OpenID Core specification
-5
routers/api/v1/repo/branch.go
···133133134134 branchName := ctx.Params("*")
135135136136- if ctx.Repo.Repository.IsEmpty {
137137- ctx.Error(http.StatusForbidden, "", "Git Repository is empty.")
138138- return
139139- }
140140-141136 // check whether branches of this repository has been synced
142137 totalNumOfBranches, err := db.Count[git_model.Branch](ctx, git_model.FindBranchOptions{
143138 RepoID: ctx.Repo.Repository.ID,