Ready to release 3.0.0
This commit is contained in:
@ -12,7 +12,7 @@ const (
|
||||
//db table's prefix. tank30_ means current version is tank:3.0.x
|
||||
TABLE_PREFIX = "tank30_"
|
||||
|
||||
VERSION = "3.0.0.beta4"
|
||||
VERSION = "3.0.0"
|
||||
)
|
||||
|
||||
type Config interface {
|
||||
|
@ -168,6 +168,7 @@ func (this *UserController) Edit(writer http.ResponseWriter, request *http.Reque
|
||||
avatarUrl := request.FormValue("avatarUrl")
|
||||
sizeLimitStr := request.FormValue("sizeLimit")
|
||||
totalSizeLimitStr := request.FormValue("totalSizeLimit")
|
||||
role := request.FormValue("role")
|
||||
|
||||
user := this.checkUser(request)
|
||||
currentUser := this.userDao.CheckByUuid(uuid)
|
||||
@ -200,6 +201,10 @@ func (this *UserController) Edit(writer http.ResponseWriter, request *http.Reque
|
||||
}
|
||||
currentUser.TotalSizeLimit = totalSizeLimit
|
||||
|
||||
if role == USER_ROLE_USER || role == USER_ROLE_ADMINISTRATOR {
|
||||
currentUser.Role = role
|
||||
}
|
||||
|
||||
} else if user.Uuid != uuid {
|
||||
panic(result.UNAUTHORIZED)
|
||||
}
|
||||
|
Reference in New Issue
Block a user