This question is locked. New answers and comments are not allowed.
Hello,
I want to change how my users are registered and authenticated, to consider another field called Organization. Effectively, I want to allow users to register by invitation only.
Specifically, when a user registers, I will make them supply their email address, a password, and an Organization string that I will give them on paper before registering. I do not want the user to be able to register unless that Organization is found in my Everlive database in a table of Organizations that I maintain. The Organization string used to register would be the Id of an item in that table.
I added an Organization field to my Users table and added a Relation field (single) pointing to the Organizations table. I find that there don't seem to be any database consistency rules applied to Relation fields when adding records, as is my experience with other relational databases, such as SQL.
I think I am misunderstanding and misusing the Relation, so here are my questions:
1) Is enforcing membership in an Organization something I will have to do in Cloud Code - and if so, can it be done?
2) Are Relation fields useful outside of Queries?
3) The documentation says a Relation is for storing "the pointer to an Id of an external type." Yet, I seem to be able to store any string in a Relation field. What am I missing?
Sincere gratitude,
Kelly
I want to change how my users are registered and authenticated, to consider another field called Organization. Effectively, I want to allow users to register by invitation only.
Specifically, when a user registers, I will make them supply their email address, a password, and an Organization string that I will give them on paper before registering. I do not want the user to be able to register unless that Organization is found in my Everlive database in a table of Organizations that I maintain. The Organization string used to register would be the Id of an item in that table.
I added an Organization field to my Users table and added a Relation field (single) pointing to the Organizations table. I find that there don't seem to be any database consistency rules applied to Relation fields when adding records, as is my experience with other relational databases, such as SQL.
I think I am misunderstanding and misusing the Relation, so here are my questions:
1) Is enforcing membership in an Organization something I will have to do in Cloud Code - and if so, can it be done?
2) Are Relation fields useful outside of Queries?
3) The documentation says a Relation is for storing "the pointer to an Id of an external type." Yet, I seem to be able to store any string in a Relation field. What am I missing?
Sincere gratitude,
Kelly