FairPlayCombined icon indicating copy to clipboard operation
FairPlayCombined copied to clipboard

Add Vouching system for new users

Open efonsecab opened this issue 9 months ago • 0 comments

As part of the efforts to protect users, one of the feature we will add is a Vouching system, here is how it will work. Users will not be able to create a new account unless they have been vouched by someone who already has an account, then, a system administrator will review the vouching details and decide if the person should be allowed to join. If new users break the platform rules, EVERYONE in the vouching chain/hierarchy, will have the account banned, this makes it so that users only vouch for persons with good intentions.

  • Move the "ApplicationUserVouch" table to the "dbo" folder, make it sure to change the script schema to "dbo" to, it currently is under "FairPlayDating"
  • Under the "dbo" folder, create the table "UserInvitation" with the following columns:
    • UserInvitationId
    • InvitingApplicationUserId
    • InvitedUserEmail
    • VouchingReason
    • RowCreationDateTime
    • RowCreationUser
    • SourceApplication
    • OriginatorIPAddress

Include a unique index for "InvitedUserEmail"

In the Admin Portal:

  • Create a new prompt constant for "AnalyzeVouchingReason".
  • Add the new prompt in the PrompEditor page

In the FairPlayDating web app

  • Add a new item "Invite User" to the main menu.
  • Create the respective models and services using the patterns for the AutoGenerated services code: Check of the usage of ServiceOfTAttribute.
  • Include an EditForm with fields for "InvitedUserEmail" and "VouchingReason", both must be required. Reason must be a minimum of 100 characters, and maximum of 1000 characters.
  • Use OpenAIService and PormptGeneratorService approach to evaluate if the provided reason makes sense, or if the users is just writing invalid / phrases that make no sense or cannot be understood.
  • If the provided reason makes sense and email is valid, then create the UserInvitation, and send an email to the users, with a new unique code.

efonsecab avatar May 20 '24 13:05 efonsecab