mirror of
https://salsa.debian.org/freeipa-team/freeipa.git
synced 2025-02-25 18:55:28 -06:00
Use constant for user and group patterns
User and groups regexp are the same and constant should be used to avoid any future misconfigurations. https://fedorahosted.org/freeipa/ticket/5822 Reviewed-By: Stanislav Laznicka <slaznick@redhat.com> Reviewed-By: Alexander Bokovoy <abokovoy@redhat.com>
This commit is contained in:
committed by
Martin Babinsky
parent
3720080611
commit
8f8e3d008f
@@ -22,6 +22,7 @@ import six
|
||||
|
||||
from ipalib import api
|
||||
from ipalib import Int, Str, Flag
|
||||
from ipalib.constants import PATTERN_GROUPUSER_NAME
|
||||
from ipalib.plugable import Registry
|
||||
from .baseldap import (
|
||||
add_external_post_callback,
|
||||
@@ -260,7 +261,7 @@ class group(LDAPObject):
|
||||
|
||||
takes_params = (
|
||||
Str('cn',
|
||||
pattern='^[a-zA-Z0-9_.][a-zA-Z0-9_.-]*[a-zA-Z0-9_.$-]?$',
|
||||
pattern=PATTERN_GROUPUSER_NAME,
|
||||
pattern_errmsg='may only include letters, numbers, _, -, . and $',
|
||||
maxlength=255,
|
||||
cli_name='group_name',
|
||||
|
||||
Reference in New Issue
Block a user