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

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