#50214 Issue:50211 - Making an actual Anonymous type in lib389/idm/account.py
Closed 3 years ago by spichugi. Opened 5 years ago by aborah.
aborah/389-ds-base ano  into  master

@@ -181,3 +181,21 @@ 

              _gen_filter(_term_gen('objectclass'), self._objectclasses)

          )

  

+     

+ class Anonymous(DSLdapObject):

+     """A single instance of Anonymous bind

+ 

+     :param instance: An instance

+     :type instance: lib389.DirSrv

+     """

+     def __init__(self, instance):

+         super(Anonymous, self).__init__(instance, dn=None)

+ 

+     def bind(self, *args, **kwargs):

+         """Open a new connection and Anonymous bind .

+         You can pass arguments that will be passed to openConnection.

+         :returns: Connection with a binding as the Anonymous

+         """

+         inst_clone = self._instance.clone({SER_ROOT_DN: '', SER_ROOT_PW: ''})

+         inst_clone.open(*args, **kwargs)

+         return inst_clone

Making an actual Anonymous type in lib389/idm/account.py

https://pagure.io/389-ds-base/issue/50211

Reviewed by: ???

rebased onto aefbcd0c02993350d0e06265c887777e661ae6d6

5 years ago

This looks really good. I think you need to also define a

def __init__(self, instance):
    super(Anonymous, self).__init__(instance, dn=None)

This way there is "no way" someone can make anonymous with a dn that is not none.

Once you do that, I'll review again, and will merge :)

rebased onto b4292904f01ee466633bce4a0324a83da13a3407

5 years ago

rebased onto 2dc2b4f81f800c60f3579419b9f730d59c567261

5 years ago

@firstyear changes has been done as per you suggestion

Is this comment for init? Or for bind? Whitespace looks a bit weird ...

rebased onto aa00ecbd140af2b46f4e9f9e466679a56bcbc26f

5 years ago

@firstyear white space and comment removed

Why did you remove this function?

rebased onto d68b131

5 years ago

Pull-Request has been merged by firstyear

5 years ago

389-ds-base is moving from Pagure to Github. This means that new issues and pull requests
will be accepted only in 389-ds-base's github repository.

This pull request has been cloned to Github as issue and is available here:
- https://github.com/389ds/389-ds-base/issues/3273

If you want to continue to work on the PR, please navigate to the github issue,
download the patch from the attachments and file a new pull request.

Thank you for understanding. We apologize for all inconvenience.

Pull-Request has been closed by spichugi

3 years ago
Metadata