Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

10
  • Regarding the two users' states. This is a very good idea! I thought about it myself but could not formulate it the way you did. As far as I understood, the Invitation model could be an OneToOne relationship with a null option. When the user assigns recipients, I would then create an Invitation model. After the recipient registers, I would create a User model and set that OneToOne field to a particular Invitation model. Regarding permissions. Is it alright to just check if recipient is included in contract and if it is, let him do some of the actions:signing, updating or etc? Commented Mar 22, 2021 at 11:40
  • As I see it, when a recipient is assigned who doesn't have a corresponding User model, you create both a User and an Invitation model. After that recipient registers, you can delete the Invitation model (it has served its purpose and is no longer needed). The Invitation model would have a mandatory OneToOne relationship to User, but the other direction would be optional. Commented Mar 22, 2021 at 13:58
  • Regarding the permissions, I can't really tell if that will work. It depends on the requirements you have about who can do which actions. Commented Mar 22, 2021 at 13:59
  • Ok, one more question. Suppose that two contract owners decide to invite the same user, with the same email? So, by following this approach I should create a user with an invited state, that would include the only email. Create an Invitation model and assign it to the User. However, what should I do if another person invites this same user? I can't create another User model, because the User technically is created, he just did not register. I think about changing OneToOne to Foreign keys, then it will be easier to track. Commented Mar 22, 2021 at 14:30
  • The user has been invited already, so no new invitation is needed. You might consider sending an email to all users that are added to a contract to notify them they are supposed to sign something. In your case, what would happen if a user responds to both invitations and tries to register multiple times? Commented Mar 22, 2021 at 15:16