()
| 977 | } |
| 978 | |
| 979 | func (c *Collection) initPasswordField() { |
| 980 | field, _ := c.Fields.GetByName(FieldNamePassword).(*PasswordField) |
| 981 | if field == nil { |
| 982 | // load default field |
| 983 | c.Fields.Add(&PasswordField{ |
| 984 | Name: FieldNamePassword, |
| 985 | System: true, |
| 986 | Hidden: true, |
| 987 | Required: true, |
| 988 | Min: 8, |
| 989 | }) |
| 990 | } else { |
| 991 | // enforce system defaults |
| 992 | field.System = true |
| 993 | field.Hidden = true |
| 994 | field.Required = true |
| 995 | } |
| 996 | } |
| 997 | |
| 998 | func (c *Collection) initTokenKeyField() { |
| 999 | field, _ := c.Fields.GetByName(FieldNameTokenKey).(*TextField) |
no test coverage detected