Projekt

Obecné

Profil

« Předchozí | Další » 

Revize 1200e6ed

Přidáno uživatelem Vojtěch Bartička před asi 2 roky(ů)

Moved Enums to Models project

Zobrazit rozdíly:

Backend/Backend/Controllers/DocumentController.cs
35 35
            return Problem();
36 36
        }
37 37

  
38
        if (clientInfo.LoggedUser.Role != Core.Enums.ERole.ADMINISTRATOR)
38
        if (clientInfo.LoggedUser.Role != Models.Enums.ERole.ADMINISTRATOR)
39 39
        {
40 40
            return Forbid("User is not administrator");
41 41
        }
......
56 56
            return Problem();
57 57
        }
58 58

  
59
        if (clientInfo.LoggedUser.Role != Core.Enums.ERole.ADMINISTRATOR)
59
        if (clientInfo.LoggedUser.Role != Models.Enums.ERole.ADMINISTRATOR)
60 60
        {
61 61
            return Forbid("User is not administrator");
62 62
        }
Backend/Core/Entities/Annotation.cs
1
using Core.Enums;
1
using Models.Enums;
2 2
using System;
3 3
using System.Collections.Generic;
4 4
using System.ComponentModel.DataAnnotations;
Backend/Core/Entities/User.cs
5 5
using System.Text;
6 6
using System.Text.Json.Serialization;
7 7
using System.Threading.Tasks;
8
using Core.Enums;
8
using Models.Enums;
9 9

  
10 10
namespace Core.Entities
11 11
{
Backend/Core/Enums/ERole.cs
1
using System;
2
using System.Collections.Generic;
3
using System.Linq;
4
using System.Text;
5
using System.Threading.Tasks;
6

  
7
namespace Core.Enums
8
{
9
    public enum ERole : int
10
    {
11
        ANNOTATOR = 0,
12
        ADMINISTRATOR = 1
13
    }
14
}
Backend/Core/Enums/EState.cs
1
using System;
2
using System.Collections.Generic;
3
using System.Linq;
4
using System.Text;
5
using System.Threading.Tasks;
6

  
7
namespace Core.Enums
8
{
9
    public enum EState
10
    {
11
        DONE, 
12
        IN_PROGRESS,
13
        NEW
14
    }
15
}
Backend/Core/Seeding/Seeder.cs
1 1
using Core.Contexts;
2 2
using Core.Entities;
3
using Core.Enums;
3
using Models.Enums;
4 4
using Microsoft.EntityFrameworkCore;
5 5
using System;
6 6
using System.Collections.Generic;
Backend/Core/Services/UserService/IUserService.cs
1 1
using Core.Entities;
2
using Core.Enums;
2
using Models.Enums;
3 3
using System;
4 4
using System.Collections.Generic;
5 5
using System.Linq;
Backend/Core/Services/UserService/UserServiceEF.cs
1 1
using Core.Contexts;
2 2
using Core.Entities;
3
using Core.Enums;
3
using Models.Enums;
4 4
using System;
5 5
using System.Collections.Generic;
6 6
using System.Linq;
Backend/Models/Authentication/LoginResponse.cs
1
using Models.Enums;
2

  
1 3
namespace Models.Authentication;
2 4

  
3 5
public class LoginResponse
......
17 19
    public bool Ok { get; set; }
18 20
    public string Token { get; set; }
19 21
    public DateTime Expiration { get; set; }
22
    public ERole Role { get; set; }
20 23
}
Backend/Models/Enums/ERole.cs
1
using System;
2
using System.Collections.Generic;
3
using System.Linq;
4
using System.Text;
5
using System.Threading.Tasks;
6

  
7
namespace Models.Enums
8
{
9
    public enum ERole : int
10
    {
11
        ANNOTATOR = 0,
12
        ADMINISTRATOR = 1
13
    }
14
}
Backend/Models/Enums/EState.cs
1
using System;
2
using System.Collections.Generic;
3
using System.Linq;
4
using System.Text;
5
using System.Threading.Tasks;
6

  
7
namespace Models.Enums
8
{
9
    public enum EState
10
    {
11
        DONE, 
12
        IN_PROGRESS,
13
        NEW
14
    }
15
}

Také k dispozici: Unified diff