mirror of
https://github.com/gitbucket/gitbucket.git
synced 2025-11-07 14:05:52 +01:00
Add full name to account and use it to create commits (#125)
The Git practice is to use the full name when creating commits, not a user name. This commit fixes that by introducing a fullName field to Account and using it when creating commits. For migrating from earlier versions, the user name is used as an initial value for the full name field.
This commit is contained in:
@@ -4,6 +4,7 @@ import scala.slick.driver.H2Driver.simple._
|
||||
|
||||
object Accounts extends Table[Account]("ACCOUNT") {
|
||||
def userName = column[String]("USER_NAME", O PrimaryKey)
|
||||
def fullName = column[String]("FULL_NAME")
|
||||
def mailAddress = column[String]("MAIL_ADDRESS")
|
||||
def password = column[String]("PASSWORD")
|
||||
def isAdmin = column[Boolean]("ADMINISTRATOR")
|
||||
@@ -13,11 +14,12 @@ object Accounts extends Table[Account]("ACCOUNT") {
|
||||
def lastLoginDate = column[java.util.Date]("LAST_LOGIN_DATE")
|
||||
def image = column[String]("IMAGE")
|
||||
def groupAccount = column[Boolean]("GROUP_ACCOUNT")
|
||||
def * = userName ~ mailAddress ~ password ~ isAdmin ~ url.? ~ registeredDate ~ updatedDate ~ lastLoginDate.? ~ image.? ~ groupAccount <> (Account, Account.unapply _)
|
||||
def * = userName ~ fullName ~ mailAddress ~ password ~ isAdmin ~ url.? ~ registeredDate ~ updatedDate ~ lastLoginDate.? ~ image.? ~ groupAccount <> (Account, Account.unapply _)
|
||||
}
|
||||
|
||||
case class Account(
|
||||
userName: String,
|
||||
fullName: String,
|
||||
mailAddress: String,
|
||||
password: String,
|
||||
isAdmin: Boolean,
|
||||
|
||||
Reference in New Issue
Block a user