Hi,

I’ve been speaking to Anuj Borah about a PR they made, and how we can properly 
represent nsRole.

because nsRoles are an extra objectClass, rather than a standalone one, we need 
a way to represent this properly.

It’s probably a good idea to use some of pythons composability here, where we 
could do something like:

class nsFilteredRole(DSLdapObject):


class User(DSldapObject):

class User_nsFilteredRole(User, nsFilteredRole):

Then to have a way to define and have each subclass called, and asserted for 
correctness. A question is how we would handle:

user = User.create(…)
# How to convert user to User_nsFilteredRole

We could do something like:

User_nsFilteredRole.from(user)

And have a from that does a valid conversion based on types and adds in the 
required role parts?

This isn’t a common scenario, so I think having a limited set of well 
understood types that require this type of conversion would be okay.

Thought? *looking at you Simon* :) 

PS: It’s good to be back

--
Sincerely,

William
_______________________________________________
389-devel mailing list -- 389-devel@lists.fedoraproject.org
To unsubscribe send an email to 389-devel-le...@lists.fedoraproject.org
Fedora Code of Conduct: https://getfedora.org/code-of-conduct.html
List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines
List Archives: 
https://lists.fedoraproject.org/archives/list/389-devel@lists.fedoraproject.org

Reply via email to