scrumlr.io icon indicating copy to clipboard operation
scrumlr.io copied to clipboard

feat: option to disable anonymous accounts

Open Schwehn42 opened this issue 8 months ago • 6 comments

Description

This PR adds the option to disable anonymous accounts.
When disabled (either by using the CLI flag disable-anonymous-login or in the config.toml), new instances of anonymous accounts cannot be created. Instead, only active providers (Google, Apple, etc.) can be used. In the frontend, the button is also grayed out (subject to change?) Closes #4169.

Note: Already logged in acounts can be still used

Changelog

backend

  • main
    • Add CLI flag enable-anonymous-login and config entry
  • router
    • add flag to Server struct
    • use context AnonymousLoginEnabledContext for route /login/anonymous
  • AnonymousLoginEnabledContext
    • check flag enable-anonymous-login, and throw error if false
  • info
    • add to info struct

frontend

  • store
    • adjust info state to include enableAnonymousLogin
  • LoginBoard
    • conditionally gray out anon login form

Checklist

  • [ ] I have performed a self-review of my own code
  • [ ] I have commented my code, particularly in hard-to-understand areas
  • [ ] The light- and dark-theme are both supported and tested
  • [ ] The design was implemented and is responsive for all devices and screen sizes
  • [ ] The application was tested in the most commonly used browsers (e.g. Chrome, Firefox, Safari)

(Optional) Visual Changes

Schwehn42 avatar Jun 03 '24 07:06 Schwehn42