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