mirror of
https://github.com/go-gitea/gitea
synced 2025-08-25 19:08:28 +00:00
Move organization's visibility change to danger zone. (#34814)
<img width="1185" alt="image" src="https://github.com/user-attachments/assets/d48c4db2-df7c-43b3-986c-62e042190a51" /> <img width="829" alt="image" src="https://github.com/user-attachments/assets/772b8a14-6837-41f2-9d78-9f0489ef1c7d" /> --------- Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
This commit is contained in:
@@ -955,6 +955,16 @@ func UpdateUserCols(ctx context.Context, u *User, cols ...string) error {
|
||||
return err
|
||||
}
|
||||
|
||||
// UpdateUserColsNoAutoTime update user according special columns
|
||||
func UpdateUserColsNoAutoTime(ctx context.Context, u *User, cols ...string) error {
|
||||
if err := ValidateUser(u, cols...); err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
_, err := db.GetEngine(ctx).ID(u.ID).Cols(cols...).NoAutoTime().Update(u)
|
||||
return err
|
||||
}
|
||||
|
||||
// GetInactiveUsers gets all inactive users
|
||||
func GetInactiveUsers(ctx context.Context, olderThan time.Duration) ([]*User, error) {
|
||||
cond := builder.And(
|
||||
|
Reference in New Issue
Block a user