How to use IdentityMappingRUleType #1546
sinelabore
started this conversation in
General
Replies: 2 comments 1 reply
-
https://docs.python.org/3/library/dataclasses.html the enum is here: which has no member 0! |
Beta Was this translation helpful? Give feedback.
1 reply
-
Hi, your link goes to the async codebase. And there the class IdentityMappingRuleType looks different. In the "non async" version the class init code is as follows:
Should that be fixed -> 1 instead of 0? |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi,
I want to call "AddIdentity()" on an object to add a user to a specific role.
The method requires an IdentityCriteriaType parameter if I understand it correctly.
My plan was to use IdentityCriteriaType and set its attributes criteriaType and criteria accordingly.
But the code line
identityMappingRuleType = ua.IdentityMappingRuleType()
triggers this error:
ValueError: 0 is not a valid IdentityCriteriaType
Which is ok, because criteriaType is an Enum whose first value is 1 (USERNAME). But how to use
ua.IdentityMappingRuleType
without triggering this error immediately before I even have the chance to set the attributes?Is there a short example how to use this Type or do I make something wrong in general?
Peter
Beta Was this translation helpful? Give feedback.
All reactions