aboutsummaryrefslogtreecommitdiff
path: root/Timeline/Authenticate/Attribute.cs
blob: 239a2a1cbc251e02eab98829e75e26cbc43eff0c (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.Entities;

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

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