mirror of
https://salsa.debian.org/freeipa-team/freeipa.git
synced 2025-02-25 18:55:28 -06:00
Rename GeneralizedTime to AccessTime.
This commit is contained in:
parent
40368f0d01
commit
34deb3fef3
@ -870,7 +870,7 @@ from frontend import Command, LocalOrRemote
|
||||
from frontend import Object, Method, Property
|
||||
from crud import Create, Retrieve, Update, Delete, Search
|
||||
from parameters import DefaultFrom, Bool, Flag, Int, Float, Bytes, Str, Password,List
|
||||
from parameters import BytesEnum, StrEnum, GeneralizedTime, File
|
||||
from parameters import BytesEnum, StrEnum, AccessTime, File
|
||||
from errors import SkipPluginModule
|
||||
|
||||
# We can't import the python uuid since it includes ctypes which makes
|
||||
|
@ -1309,9 +1309,9 @@ class File(Str):
|
||||
)
|
||||
|
||||
|
||||
class GeneralizedTime(Str):
|
||||
class AccessTime(Str):
|
||||
"""
|
||||
Generalized time parameter type.
|
||||
Access time parameter type.
|
||||
|
||||
Accepts values conforming to generalizedTime as defined in RFC 4517
|
||||
section 3.3.13 without time zone information.
|
||||
@ -1427,7 +1427,7 @@ class GeneralizedTime(Str):
|
||||
if len(t) not in (10, 12, 14):
|
||||
raise ValueError('incomplete generalized time')
|
||||
if not t.isnumeric():
|
||||
raise ValueError('generalized time non-numeric')
|
||||
raise ValueError('time non-numeric')
|
||||
# don't check year value, with time travel and all :)
|
||||
self._check_month_num(t[4:6])
|
||||
year_num = int(t[0:4])
|
||||
@ -1450,7 +1450,7 @@ class GeneralizedTime(Str):
|
||||
raise ValueError('invalid time range separator')
|
||||
self._check_generalized(ts[3])
|
||||
if int(ts[1]) >= int(ts[3]):
|
||||
raise ValueError('invalid generalized time range')
|
||||
raise ValueError('invalid time range')
|
||||
elif ts[0] == 'periodic':
|
||||
if ts[1] == 'yearly':
|
||||
index = self._check_Y_spec(ts, 2)
|
||||
|
@ -21,7 +21,7 @@ Host based access control
|
||||
"""
|
||||
|
||||
from ipalib import api, errors
|
||||
from ipalib import GeneralizedTime, Password, Str, StrEnum
|
||||
from ipalib import AccessTime, Password, Str, StrEnum
|
||||
from ipalib.plugins.baseldap import *
|
||||
|
||||
class hbac(LDAPObject):
|
||||
@ -222,7 +222,7 @@ class hbac_add_accesstime(LDAPQuery):
|
||||
Add access time to HBAC rule.
|
||||
"""
|
||||
takes_options = (
|
||||
GeneralizedTime('accesstime',
|
||||
AccessTime('accesstime',
|
||||
cli_name='time',
|
||||
doc='access time',
|
||||
),
|
||||
@ -260,7 +260,7 @@ class hbac_remove_accesstime(LDAPQuery):
|
||||
Remove access time to HBAC rule.
|
||||
"""
|
||||
takes_options = (
|
||||
GeneralizedTime('accesstime?',
|
||||
AccessTime('accesstime?',
|
||||
cli_name='time',
|
||||
doc='access time',
|
||||
),
|
||||
|
Loading…
Reference in New Issue
Block a user