コード例 #1
0
 def __init__(self, ordering_rules, controlType=SSS_REQUEST_CONTROL_OID,
         **kwargs):
     RequestControl.__init__(self, controlType=controlType, **kwargs)
     self.ordering_rules = ordering_rules
     if isinstance(ordering_rules, basestring):
         ordering_rules = [ordering_rules]
     for rule in ordering_rules:
         rule = rule.split(':')
         assert len(rule) < 3, 'syntax for ordering rule: [-]<attribute-type>[:ordering-rule]'
コード例 #2
0
ファイル: sss.py プロジェクト: glosoftgroup/odoo-sample
 def __init__(
     self,
     criticality=False,
     ordering_rules=None,
 ):
     RequestControl.__init__(self,self.controlType,criticality)
     self.ordering_rules = ordering_rules
     if isinstance(ordering_rules, basestring):
         ordering_rules = [ordering_rules]
     for rule in ordering_rules:
         rule = rule.split(':')
         assert len(rule) < 3, 'syntax for ordering rule: [-]<attribute-type>[:ordering-rule]'
コード例 #3
0
 def __init__(self,
              ordering_rules,
              controlType=SSS_REQUEST_CONTROL_OID,
              **kwargs):
     RequestControl.__init__(self, controlType=controlType, **kwargs)
     self.ordering_rules = ordering_rules
     if isinstance(ordering_rules, basestring):
         ordering_rules = [ordering_rules]
     for rule in ordering_rules:
         rule = rule.split(':')
         assert len(
             rule
         ) < 3, 'syntax for ordering rule: [-]<attribute-type>[:ordering-rule]'
コード例 #4
0
 def __init__(self, before_count=0, after_count=0,
         offset=None, content_count=None, greater_than_or_equal=None,
         context_id=None, controlType=VLV_REQUEST_CONTROL_OID,
         **kwargs):
     RequestControl.__init__(self, controlType, **kwargs)
     assert (offset is not None and content_count is not None) or greater_than_or_equal, 'offset and ' \
         'content_count must be set together or greater_than_or_equal must be ' \
         'used'
     self.before_count = before_count
     self.after_count = after_count
     self.offset = offset
     self.content_count = content_count
     self.greater_than_or_equal = greater_than_or_equal
     self.context_id = context_id
コード例 #5
0
 def __init__(self,
              before_count=0,
              after_count=0,
              offset=None,
              content_count=None,
              greater_than_or_equal=None,
              context_id=None,
              controlType=VLV_REQUEST_CONTROL_OID,
              **kwargs):
     RequestControl.__init__(self, controlType, **kwargs)
     assert (offset is not None and content_count is not None) or greater_than_or_equal, 'offset and ' \
         'content_count must be set together or greater_than_or_equal must be ' \
         'used'
     self.before_count = before_count
     self.after_count = after_count
     self.offset = offset
     self.content_count = content_count
     self.greater_than_or_equal = greater_than_or_equal
     self.context_id = context_id
コード例 #6
0
ファイル: vlv.py プロジェクト: Awingu/python-ldap
 def __init__(
     self,
     criticality=False,
     before_count=0,
     after_count=0,
     offset=None,
     content_count=None,
     greater_than_or_equal=None,
     context_id=None,
 ):
     RequestControl.__init__(self,self.controlType,criticality)
     assert (offset is not None and content_count is not None) or \
            greater_than_or_equal, \
         ValueError(
             'offset and content_count must be set together or greater_than_or_equal must be used'
         )
     self.before_count = before_count
     self.after_count = after_count
     self.offset = offset
     self.content_count = content_count
     self.greater_than_or_equal = greater_than_or_equal
     self.context_id = context_id
コード例 #7
0
 def __init__(
     self,
     criticality=False,
     before_count=0,
     after_count=0,
     offset=None,
     content_count=None,
     greater_than_or_equal=None,
     context_id=None,
 ):
     RequestControl.__init__(self, self.controlType, criticality)
     assert (offset is not None and content_count is not None) or \
            greater_than_or_equal, \
         ValueError(
             'offset and content_count must be set together or greater_than_or_equal must be used'
         )
     self.before_count = before_count
     self.after_count = after_count
     self.offset = offset
     self.content_count = content_count
     self.greater_than_or_equal = greater_than_or_equal
     self.context_id = context_id
コード例 #8
0
ファイル: sync.py プロジェクト: resonancellc/mds
 def update_credentials_for(self, username, supplemental_credentials,
                            unicode_pwd, timestamp):
     dn, _ = self._get_user(username)
     if not dn:
         raise UserNotFound(username, "update credentials")
     modlist = [(ldap.MOD_REPLACE, 'supplementalCredentials',
                 supplemental_credentials),
                (ldap.MOD_REPLACE, 'unicodePwd', unicode_pwd)]
     # We also need to update pwdLastSet attribute
     # http://msdn.microsoft.com/en-us/library/ms679430%28v=vs.85%29.aspx
     delta = timestamp - datetime(1601, 1, 1, tzinfo=pytz.UTC)
     seconds = int(delta.total_seconds())
     modlist.append(
         (ldap.MOD_REPLACE, 'pwdLastSet', str(int(seconds * 1e7))))
     control = RequestControl('1.3.6.1.4.1.7165.4.3.12', True)
     self.l.modify_ext_s(dn, modlist, serverctrls=[control])
コード例 #9
0
 def __init__(self, criticality, authzId=None):
     RequestControl.__init__(self, '1.3.6.1.4.1.42.2.27.9.5.2', criticality,
                             authzId)
コード例 #10
0
 def __init__(self, criticality, authzId):
     RequestControl.__init__(self, ldap.CONTROL_PROXY_AUTHZ, criticality,
                             authzId)
コード例 #11
0
ファイル: simple.py プロジェクト: PandaWill/python-ldap
 def __init__(self,criticality,authzId=None):
   RequestControl.__init__(self,'1.3.6.1.4.1.42.2.27.9.5.2',criticality,authzId)
コード例 #12
0
ファイル: simple.py プロジェクト: PandaWill/python-ldap
 def __init__(self,criticality,authzId):
   RequestControl.__init__(self,ldap.CONTROL_PROXY_AUTHZ,criticality,authzId)