mirror of
https://github.com/goharbor/harbor.git
synced 2024-12-23 00:57:44 +01:00
Allow 255 chars for Realname
This commit is contained in:
parent
6ee631d1eb
commit
18cea61121
@ -47,7 +47,7 @@ create table user (
|
||||
# 11 bytes is reserved for marking the deleted users.
|
||||
email varchar(255),
|
||||
password varchar(40) NOT NULL,
|
||||
realname varchar (20) NOT NULL,
|
||||
realname varchar (255) NOT NULL,
|
||||
comment varchar (30),
|
||||
deleted tinyint (1) DEFAULT 0 NOT NULL,
|
||||
reset_uuid varchar(40) DEFAULT NULL,
|
||||
|
@ -44,7 +44,7 @@ create table user (
|
||||
*/
|
||||
email varchar(255),
|
||||
password varchar(40) NOT NULL,
|
||||
realname varchar (20) NOT NULL,
|
||||
realname varchar (255) NOT NULL,
|
||||
comment varchar (30),
|
||||
deleted tinyint (1) DEFAULT 0 NOT NULL,
|
||||
reset_uuid varchar(40) DEFAULT NULL,
|
||||
|
@ -374,7 +374,7 @@ func commonValidate(user models.User) error {
|
||||
return fmt.Errorf("Email can't be empty")
|
||||
}
|
||||
|
||||
if isIllegalLength(user.Realname, 1, 20) {
|
||||
if isIllegalLength(user.Realname, 1, 255) {
|
||||
return fmt.Errorf("realname with illegal length")
|
||||
}
|
||||
|
||||
|
@ -15,7 +15,7 @@ class User(Base):
|
||||
username = sa.Column(sa.String(15), unique=True)
|
||||
email = sa.Column(sa.String(30), unique=True)
|
||||
password = sa.Column(sa.String(40), nullable=False)
|
||||
realname = sa.Column(sa.String(20), nullable=False)
|
||||
realname = sa.Column(sa.String(255), nullable=False)
|
||||
comment = sa.Column(sa.String(30))
|
||||
deleted = sa.Column(sa.Integer, nullable=False, server_default=sa.text("'0'"))
|
||||
reset_uuid = sa.Column(sa.String(40))
|
||||
|
Loading…
Reference in New Issue
Block a user