Check for existence of password in skeleton before modifying it in modules.user.User.addSkel()#24
Check for existence of password in skeleton before modifying it in modules.user.User.addSkel()#24
Conversation
There are cases (e.g. with different login methods) that a userSkel has an unset password bone because it is not necessary or wanted.
| skel.password.required = True | ||
| skel.password.visible = True | ||
| skel.password.readOnly = False | ||
| if "password" in skel: |
There was a problem hiding this comment.
How can the password bone not be in that skel? It's calling the underlying prototypes/list.py:addSkel, which in turn calls self._resolveSkelCls. None of these can / should mess with the skeleton.
There was a problem hiding this comment.
This happens in a case where my project does not use the Username-Password-method, but Google user and another login method.
There was a problem hiding this comment.
This issue is now over one year old. Can you please apply it? Under several reasons, a password bone is not available in different projects.
There was a problem hiding this comment.
Any inputs from others?
I don't mind if we merge this as it won't break anything, but in my opinion you are doing something wrong if you can trigger this. My preferred method would be setting the bone to visible=False and readOnly=True instead of removing it from the predefined skeleton. These bones are there for a reason, you remove parententry from hierarchySkels things will fall apart similarly.
There are cases (e.g. with different login methods) that a userSkel has an unset password bone because it is not necessary or wanted.