From b30c8bdf5b22eb6435a962d8e7b9e880971b6346 Mon Sep 17 00:00:00 2001 From: kotcheshir73 Date: Sat, 3 Apr 2021 09:39:50 +0400 Subject: [PATCH] =?UTF-8?q?=D1=81=D1=82=D1=80=D0=BE=D0=BA=D0=B0=20=D0=BA?= =?UTF-8?q?=D0=BE=D0=BC=D0=BC=D0=B5=D0=BD=D1=82=D0=B0=D1=80=D0=B8=D1=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Common/DatabaseCore/Models/Security/Access.cs | 8 +++++--- .../DatabaseCore/Models/Security/EnviromentSetting.cs | 6 ++++++ .../Common/DatabaseCore/Models/Security/Role.cs | 2 ++ .../Common/DatabaseCore/Models/Security/User.cs | 4 +++- .../Common/DatabaseCore/Models/Security/UserRole.cs | 4 +++- 5 files changed, 19 insertions(+), 5 deletions(-) diff --git a/DepartmentPortal/Common/DatabaseCore/Models/Security/Access.cs b/DepartmentPortal/Common/DatabaseCore/Models/Security/Access.cs index e4996a6..0c8b8f7 100644 --- a/DepartmentPortal/Common/DatabaseCore/Models/Security/Access.cs +++ b/DepartmentPortal/Common/DatabaseCore/Models/Security/Access.cs @@ -34,7 +34,11 @@ namespace DatabaseCore.Models.Security public virtual Role Role { get; set; } - public Access SecurityCheck(Access entity, bool allowFullData) + //------------------------------------------------------------------------- + + //------------------------------------------------------------------------- + + public Access SecurityCheck(Access entity, bool allowFullData) { if (!allowFullData) { @@ -42,7 +46,5 @@ namespace DatabaseCore.Models.Security } return entity; } - - //------------------------------------------------------------------------- } } \ No newline at end of file diff --git a/DepartmentPortal/Common/DatabaseCore/Models/Security/EnviromentSetting.cs b/DepartmentPortal/Common/DatabaseCore/Models/Security/EnviromentSetting.cs index 2c33a05..90e7563 100644 --- a/DepartmentPortal/Common/DatabaseCore/Models/Security/EnviromentSetting.cs +++ b/DepartmentPortal/Common/DatabaseCore/Models/Security/EnviromentSetting.cs @@ -26,6 +26,12 @@ namespace DatabaseCore.Models.Security [MapConfiguration("Description")] public string Description { get; set; } + //------------------------------------------------------------------------- + + //------------------------------------------------------------------------- + + //------------------------------------------------------------------------- + public EnviromentSetting SecurityCheck(EnviromentSetting entity, bool allowFullData) { if (!allowFullData) diff --git a/DepartmentPortal/Common/DatabaseCore/Models/Security/Role.cs b/DepartmentPortal/Common/DatabaseCore/Models/Security/Role.cs index e9a51e9..78f525d 100644 --- a/DepartmentPortal/Common/DatabaseCore/Models/Security/Role.cs +++ b/DepartmentPortal/Common/DatabaseCore/Models/Security/Role.cs @@ -31,6 +31,8 @@ namespace DatabaseCore.Models.Security [ForeignKey("RoleId")] public virtual List UserRoles { get; set; } + //------------------------------------------------------------------------- + public Role SecurityCheck(Role entity, bool allowFullData) => entity; } diff --git a/DepartmentPortal/Common/DatabaseCore/Models/Security/User.cs b/DepartmentPortal/Common/DatabaseCore/Models/Security/User.cs index ec105ef..3c85335 100644 --- a/DepartmentPortal/Common/DatabaseCore/Models/Security/User.cs +++ b/DepartmentPortal/Common/DatabaseCore/Models/Security/User.cs @@ -49,7 +49,9 @@ namespace DatabaseCore.Models.Security [ForeignKey("UserId")] public virtual List UserRoles { get; set; } - public User SecurityCheck(User entity, bool allowFullData) + //------------------------------------------------------------------------- + + public User SecurityCheck(User entity, bool allowFullData) { if (!allowFullData) { diff --git a/DepartmentPortal/Common/DatabaseCore/Models/Security/UserRole.cs b/DepartmentPortal/Common/DatabaseCore/Models/Security/UserRole.cs index 0b81721..167b8e3 100644 --- a/DepartmentPortal/Common/DatabaseCore/Models/Security/UserRole.cs +++ b/DepartmentPortal/Common/DatabaseCore/Models/Security/UserRole.cs @@ -28,8 +28,10 @@ namespace DatabaseCore.Models.Security public virtual User User { get; set; } - public UserRole SecurityCheck(UserRole entity, bool allowFullData) => entity; + //------------------------------------------------------------------------- //------------------------------------------------------------------------- + + public UserRole SecurityCheck(UserRole entity, bool allowFullData) => entity; } } \ No newline at end of file