Closed mhrivnak closed 12 years ago
When a user is self-registering (creating themself without an auth token), they can type in an alleged organization to which they belong. If they type in the external UID for an org, they should be automatically added to that org. Each org should have a boolean value to enable or disable this behavior.
It seems the external_uid
should allow NULL if there are organizations that will not have this functionality. In that case the existence of a NULL value would indicate that the behavior is disabled. That way we won't have to store an extra attribute. Let me know if I am missing something.
Which OrgRole should the user get? I'm guessing "User" for now but that will couple this functionality to 'precor_org_roles.json'.
I suppose we could also first look for any slots with the OrgRole.defualt =True
default_orgrole = OrgRole.objects.get(user_org_roles__persistent=True,
user_org_roles__organization=some_org, role__default=True)
Nevermind it looks like assigning a default role is taken care of in UserOrgRole.save(). It also looks like there can only be one default OrgRole in the system. I initially thought it was per organization.
There may be cases where we want to use this external UID to search for an org, and for correlating org data across systems, but not for automatic user membership. Thus, we still need that extra boolean value.
On Sun, Feb 5, 2012 at 7:18 PM, John O'Connor reply@reply.github.com wrote:
When a user is self-registering (creating themself without an auth token), they can type in an alleged organization to which they belong. If they type in the external UID for an org, they should be automatically added to that org. Each org should have a boolean value to enable or disable this behavior.
It seems the
external_uid
should allow NULL if there are organizations that will not have this functionality. In that case the existence of a NULL value would indicate that the behavior is disabled. That way we won't have to store an extra attribute. Let me know if I am missing something.
Reply to this email directly or view it on GitHub: https://github.com/TireSwingSoftware/openassign-server/issues/96#issuecomment-3822095
On Sun, Feb 5, 2012 at 8:48 PM, Michael Hrivnak reply@reply.github.com wrote:
There may be cases where we want to use this external UID to search for an org, and for correlating org data across systems, but not for automatic user membership. Thus, we still need that extra boolean value.
I see. OK.
Let's make a minor change and make the Organization.use_external_uid have a default value of False. In case someone doesn't fully understand this feature, we don't want the default behavior to allow new users to gain membership by guessing an external_uid. You know that somebody is going to be filling out the "create" form, see that field, and just put a "1" in it without taking the time to think through the consequences.
The organization model needs an external unique identifier. For example, our current customer has an ERP system that assigns a unique ID to each organization, and they need to track that ID within our system.
Let's store this as a string. Perhaps 32 characters is reasonable, since that's enough to store the string representation of a UUID.
When a user is self-registering (creating themself without an auth token), they can type in an alleged organization to which they belong. If they type in the external UID for an org, they should be automatically added to that org. Each org should have a boolean value to enable or disable this behavior.