- Sort Score
- Result 10 results
- Languages All
Results 1 - 3 of 3 for permissions (0.17 sec)
-
schema/field_test.go
} func TestParseFieldWithPermission(t *testing.T) { user, err := schema.Parse(&UserWithPermissionControl{}, &sync.Map{}, schema.NamingStrategy{}) if err != nil { t.Fatalf("Failed to parse user with permission, got error %v", err) } fields := []*schema.Field{
Go - Registered: Sun May 05 09:35:13 GMT 2024 - Last Modified: Sat Feb 19 09:02:53 GMT 2022 - 12.7K bytes - Viewed (0) -
schema/schema.go
field.DBName = namer.ColumnName(schema.Table, field.Name) } bindName := field.BindName() if field.DBName != "" { // nonexistence or shortest path or first appear prioritized if has permission if v, ok := schema.FieldsByDBName[field.DBName]; !ok || ((field.Creatable || field.Updatable || field.Readable) && len(field.BindNames) < len(v.BindNames)) { if _, ok := schema.FieldsByDBName[field.DBName]; !ok {
Go - Registered: Sun May 05 09:35:13 GMT 2024 - Last Modified: Tue Oct 10 06:50:29 GMT 2023 - 13.7K bytes - Viewed (0) -
schema/field.go
field.Size = 8 case reflect.Int16, reflect.Uint16: field.Size = 16 case reflect.Int32, reflect.Uint32, reflect.Float32: field.Size = 32 } } // setup permission if val, ok := field.TagSettings["-"]; ok { val = strings.ToLower(strings.TrimSpace(val)) switch val { case "-": field.Creatable = false field.Updatable = false field.Readable = false
Go - Registered: Sun May 05 09:35:13 GMT 2024 - Last Modified: Mon Apr 15 03:20:20 GMT 2024 - 32K bytes - Viewed (1)