summaryrefslogtreecommitdiffstats
path: root/ipalib/plugins/netgroup.py
diff options
context:
space:
mode:
Diffstat (limited to 'ipalib/plugins/netgroup.py')
-rw-r--r--ipalib/plugins/netgroup.py6
1 files changed, 6 insertions, 0 deletions
diff --git a/ipalib/plugins/netgroup.py b/ipalib/plugins/netgroup.py
index fd3478e9..2ba15464 100644
--- a/ipalib/plugins/netgroup.py
+++ b/ipalib/plugins/netgroup.py
@@ -49,6 +49,10 @@ EXAMPLES:
ipa netgroup-del admins
""")
+
+NETGROUP_PATTERN='^[a-zA-Z0-9_.][a-zA-Z0-9_.-]+$'
+NETGROUP_PATTERN_ERRMSG='may only include letters, numbers, _, -, and .'
+
output_params = (
Str('memberuser_user?',
label='Member User',
@@ -101,6 +105,8 @@ class netgroup(LDAPObject):
takes_params = (
Str('cn',
+ pattern=NETGROUP_PATTERN,
+ pattern_errmsg=NETGROUP_PATTERN_ERRMSG,
cli_name='name',
label=_('Netgroup name'),
primary_key=True,