Skip to content

Allow email (OTP) users to be promoted to admin #565

Description

@compscidr

Background

#548 adds an /admin/users page where an existing admin can promote and demote other users. Promotion is limited to GitHub users, matching the documented rule that admin login stays GitHub-only (the email one-time-code login introduced in #523 is a weaker credential than OAuth against the server's client secret).

Proposal

Decide whether, and under what conditions, an email/OTP user can hold admin. Possible directions:

  • allow it outright (simplest; relies on the mailbox being as trustworthy as a GitHub account),
  • allow it behind a setting or .env flag so operators opt in,
  • require a stronger second factor for email admins.

Whichever is picked, Auth.PromoteAdmin currently returns ErrNotPromotable for Provider == "email"; that check and the README note are the things to change.

Follow-on from #548.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions