Skip to content

176 invite user#181

Merged
runleveldev merged 3 commits intomainfrom
176-invite-user
Feb 6, 2026
Merged

176 invite user#181
runleveldev merged 3 commits intomainfrom
176-invite-user

Conversation

@runleveldev
Copy link
Copy Markdown
Collaborator

This pull request introduces a full invitation system for user registration, allowing admins to invite users via email with a secure, time-limited token. It includes new database models and migrations, changes to registration logic, UI updates, and email functionality. The most important changes are grouped below:

Invitation System Backend:

  • Added a new Sequelize migration (create-invite-tokens.js) and model (invite-token.js) for storing invite tokens, including token generation, validation, usage marking, and cleanup methods. [1] [2]
  • Updated registration logic in register.js to support invite tokens: validates tokens, pre-fills the invited email, auto-activates invited users, and marks tokens as used after registration. [1] [2]

Admin User Invitation Flow:

  • Added new routes in users.js for inviting users via email, including form display and sending invitation emails, with checks for SMTP setup and duplicate emails. [1] [2]
  • Implemented the sendInviteEmail function in email.js to generate and send styled invitation emails with registration links and token expiration info.

User Interface Updates:

  • Updated the registration form (register.ejs) to show an invite banner, pre-fill and lock the email field for invited users, and preserve invite tokens through redirects. [1] [2] [3]
  • Added a new "Invite User" button to the users index page and created the invitation form view (users/invite.ejs) for admins. [1] [2]
  • Added CSS styling for readonly input fields to visually indicate locked fields.

These changes collectively enable a secure, admin-driven invitation workflow for user onboarding.

@runleveldev runleveldev linked an issue Feb 6, 2026 that may be closed by this pull request
@runleveldev runleveldev force-pushed the 176-invite-user branch 2 times, most recently from 3149f10 to e37ef0b Compare February 6, 2026 16:13
@runleveldev runleveldev marked this pull request as ready for review February 6, 2026 16:14
Comment thread create-a-container/routers/login.js Dismissed
Copy link
Copy Markdown

@gfoxMIE gfoxMIE left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Copy link
Copy Markdown
Collaborator

@cmyers-mieweb cmyers-mieweb left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@runleveldev runleveldev merged commit bcaccfe into main Feb 6, 2026
4 of 5 checks passed
@runleveldev runleveldev deleted the 176-invite-user branch February 6, 2026 21:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Invite User

4 participants