Skip to content

Commit

Permalink
website/admin: add permissions to the form returned by postSongs
Browse files Browse the repository at this point in the history
  • Loading branch information
Wessie committed Mar 25, 2024
1 parent f0c5f2d commit 0f03eaa
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions website/admin/songs.go
Original file line number Diff line number Diff line change
Expand Up @@ -202,5 +202,7 @@ func NewSongsForm(ts radio.TrackStorage, user radio.User, values url.Values) (*S
song.LastEditor = user.Username

form.Song = *song
form.HasDelete = user.UserPermissions.Has(radio.PermDatabaseDelete)
form.HasEdit = user.UserPermissions.Has(radio.PermDatabaseEdit)
return &form, nil
}

0 comments on commit 0f03eaa

Please sign in to comment.