aboutsummaryrefslogtreecommitdiff
path: root/Timeline/Authenticate/Attribute.cs
blob: 1875a21b378bfd62f5fe10ce494f0b8170d78b44 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
using Microsoft.AspNetCore.Authorization;
using Timeline.Models;

namespace Timeline.Authenticate
{
    public class AdminAuthorizeAttribute : AuthorizeAttribute
    {
        public AdminAuthorizeAttribute()
        {
            Roles = UserRoles.Admin;
        }
    }

    public class UserAuthorizeAttribute : AuthorizeAttribute
    {
        public UserAuthorizeAttribute()
        {
            Roles = UserRoles.User;
        }
    }
}