1 parent
289a8cc2d8
commit
66f36cfac6
19 files changed
+1905
-817
No files matched your search
@@ -129,3 +129,12 @@ func (e *Editor) SyncGroups(ctx context.Context, desired []config.Group, foreign
|
||||
}
|
||||
return res, nil
|
||||
}
|
||||
|
||||
// CheckGroupName reports why name cannot be a ClientGroup's object name, so a
|
||||
// validation endpoint can say it before a save does.
|
||||
func CheckGroupName(name string) error {
|
||||
if name == "" {
|
||||
return fmt.Errorf("a group needs a name")
|
||||
}
|
||||
return checkName("group", name)
|
||||
}
|
||||
Reference in new issue
Block a user