Implement sign-up codes #1
Labels
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference: digimint/taskflower#1
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Sign-up restrictions are controlled by enum-type configuration parameter
sign_up_mode. Sign-ups can beOPEN(no restrictions),USERS_CAN_INVITE(invites required but any user can generate one), orADMINS_CAN_INVITE(invites required and only the system admin can generate one)Sign-up codes are stored as DB object
SignUpCode. Logic for checking and deleting sign-up codes is stored intaskflower.form.user.CreateUserForm- ifCreateUserForm.validate()returnsTrue, then the validation was successful, and callingcreate_object()will automatically delete the sign-up code.This logic also injects an extra parameter into the
formobject for template purposes -form.code_requiredisTrueif the user needs to provide a sign-up code. The HTML template should check this value and show or hide the field accordingly.templates/user/new_user.htmlnow properly checksform.code_requiredand will insert a code entry field if needed.