1
0
Fork 0
mirror of https://github.com/binwiederhier/ntfy.git synced 2025-05-31 18:49:20 +02:00

Add Access Tokens UI

This commit is contained in:
binwiederhier 2023-01-27 23:10:59 -05:00
parent 62140ec001
commit 16c14bf709
19 changed files with 643 additions and 132 deletions

View file

@ -254,6 +254,13 @@ func (v *visitor) User() *user.User {
return v.user // May be nil
}
// Authenticated returns true if a user successfully authenticated
func (v *visitor) Authenticated() bool {
v.mu.Lock()
defer v.mu.Unlock()
return v.user != nil
}
// SetUser sets the visitors user to the given value
func (v *visitor) SetUser(u *user.User) {
v.mu.Lock()