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.
- 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?Viktor Vostrikov– Viktor Vostrikov2021-03-22 11:40:21 +00:00Commented 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.Bart van Ingen Schenau– Bart van Ingen Schenau2021-03-22 13:58:29 +00:00Commented 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.Bart van Ingen Schenau– Bart van Ingen Schenau2021-03-22 13:59:10 +00:00Commented 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.Viktor Vostrikov– Viktor Vostrikov2021-03-22 14:30:42 +00:00Commented 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?Bart van Ingen Schenau– Bart van Ingen Schenau2021-03-22 15:16:19 +00:00Commented Mar 22, 2021 at 15:16
| Show 5 more comments
How to Edit
- Correct minor typos or mistakes
- Clarify meaning without changing it
- Add related resources or links
- Always respect the author’s intent
- Don’t use edits to reply to the author
How to Format
- create code fences with backticks ` or tildes ~ ```
like so
``` - add language identifier to highlight code ```python
def function(foo):
print(foo)
``` - put returns between paragraphs
- for linebreak add 2 spaces at end
- _italic_ or **bold**
- indent code by 4 spaces
- backtick escapes
`like _so_` - quote by placing > at start of line
- to make links (use https whenever possible) <https://example.com>[example](https://example.com)<a href="https://example.com">example</a>
How to Tag
A tag is a keyword or label that categorizes your question with other, similar questions. Choose one or more (up to 5) tags that will help answerers to find and interpret your question.
- complete the sentence: my question is about...
- use tags that describe things or concepts that are essential, not incidental to your question
- favor using existing popular tags
- read the descriptions that appear below the tag
If your question is primarily about a topic for which you can't find a tag:
- combine multiple words into single-words with hyphens (e.g. design-patterns), up to a maximum of 35 characters
- creating new tags is a privilege; if you can't yet create a tag you need, then post this question without it, then ask the community to create it for you