mirror of
https://github.com/goharbor/harbor.git
synced 2025-01-03 14:37:44 +01:00
Merge pull request #2570 from samifruit514/master
Allow 255 chars for Realname
This commit is contained in:
commit
d849c36e3f
@ -47,7 +47,7 @@ create table user (
|
|||||||
# 11 bytes is reserved for marking the deleted users.
|
# 11 bytes is reserved for marking the deleted users.
|
||||||
email varchar(255),
|
email varchar(255),
|
||||||
password varchar(40) NOT NULL,
|
password varchar(40) NOT NULL,
|
||||||
realname varchar (20) NOT NULL,
|
realname varchar (255) NOT NULL,
|
||||||
comment varchar (30),
|
comment varchar (30),
|
||||||
deleted tinyint (1) DEFAULT 0 NOT NULL,
|
deleted tinyint (1) DEFAULT 0 NOT NULL,
|
||||||
reset_uuid varchar(40) DEFAULT NULL,
|
reset_uuid varchar(40) DEFAULT NULL,
|
||||||
|
@ -44,7 +44,7 @@ create table user (
|
|||||||
*/
|
*/
|
||||||
email varchar(255),
|
email varchar(255),
|
||||||
password varchar(40) NOT NULL,
|
password varchar(40) NOT NULL,
|
||||||
realname varchar (20) NOT NULL,
|
realname varchar (255) NOT NULL,
|
||||||
comment varchar (30),
|
comment varchar (30),
|
||||||
deleted tinyint (1) DEFAULT 0 NOT NULL,
|
deleted tinyint (1) DEFAULT 0 NOT NULL,
|
||||||
reset_uuid varchar(40) DEFAULT 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")
|
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")
|
return fmt.Errorf("realname with illegal length")
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -15,7 +15,7 @@ class User(Base):
|
|||||||
username = sa.Column(sa.String(15), unique=True)
|
username = sa.Column(sa.String(15), unique=True)
|
||||||
email = sa.Column(sa.String(30), unique=True)
|
email = sa.Column(sa.String(30), unique=True)
|
||||||
password = sa.Column(sa.String(40), nullable=False)
|
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))
|
comment = sa.Column(sa.String(30))
|
||||||
deleted = sa.Column(sa.Integer, nullable=False, server_default=sa.text("'0'"))
|
deleted = sa.Column(sa.Integer, nullable=False, server_default=sa.text("'0'"))
|
||||||
reset_uuid = sa.Column(sa.String(40))
|
reset_uuid = sa.Column(sa.String(40))
|
||||||
|
Loading…
Reference in New Issue
Block a user