add exception filter when user not connected default to needing authentication and apply anonymous to some actions add user in get requests add user relation in link, comment and vote signup and in are ok now!
17 lines
331 B
C#
17 lines
331 B
C#
using System.ComponentModel.DataAnnotations;
|
|
|
|
namespace Website.Models
|
|
{
|
|
public sealed class RegisterViewModel
|
|
{
|
|
[Required]
|
|
public string Username { get; set; }
|
|
|
|
[Required]
|
|
public string Password { get; set; }
|
|
|
|
[Required]
|
|
[Compare(nameof(Password))]
|
|
public string PasswordConfirm { get; set; }
|
|
}
|
|
} |