aboutsummaryrefslogtreecommitdiff
path: root/BackEnd/Timeline/Auth/Attribute.cs
blob: 86d0109b25e3a84a8f164a0c0c93d3662bb3293f (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.Auth
{
    public class AdminAuthorizeAttribute : AuthorizeAttribute
    {
        public AdminAuthorizeAttribute()
        {
            Roles = UserRoles.Admin;
        }
    }

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