diff --git a/B3ClientService/Rpcs/UserInfoRpc.cs b/B3ClientService/Rpcs/UserInfoRpc.cs index 891a64b..0dc58a2 100644 --- a/B3ClientService/Rpcs/UserInfoRpc.cs +++ b/B3ClientService/Rpcs/UserInfoRpc.cs @@ -32,5 +32,11 @@ namespace BWP.B3ClientService.Rpcs query.Range = SelectRange.Top(1); return query.EExecuteScalar(); } + + [Rpc] + public static bool UserIsInRole(string roleName) + { + return BLContext.Current.User.IsInRole("B3ClientService." + roleName); + } } } diff --git a/B3ClientService/Tasks/SyncInfoFromServer.cs b/B3ClientService/Tasks/SyncInfoFromServer.cs index 17dbc7d..8ed730f 100644 --- a/B3ClientService/Tasks/SyncInfoFromServer.cs +++ b/B3ClientService/Tasks/SyncInfoFromServer.cs @@ -198,7 +198,7 @@ namespace BWP.B3ClientService.Tasks entity.Name = o.Get("Name"); entity.Stopped = o.Get("Stopped"); entity.Password = o.Get("Password"); - entity.RoleSchema = o.Get("RoleSchema"); + entity.RoleSchema = "default";//o.Get("RoleSchema"); context.Session.Insert(entity); } var sql2 = @"SET IDENTITY_INSERT [WPF_User] OFF;"; @@ -271,7 +271,7 @@ namespace BWP.B3ClientService.Tasks entity.Department_Name = o.Get("Department_Name"); entity.AccountingUnit_ID = o.Get("AccountingUnit_ID"); entity.AccountingUnit_Name = o.Get("AccountingUnit_Name"); - entity.Role = o.Get("Role"); + //entity.Role = o.Get("Role"); context.Session.Insert(entity); } context.Commit(); diff --git a/WebFolder/config/plugins/B3ClientService.plugin b/WebFolder/config/plugins/B3ClientService.plugin index 6296580..a5d806d 100644 --- a/WebFolder/config/plugins/B3ClientService.plugin +++ b/WebFolder/config/plugins/B3ClientService.plugin @@ -12,6 +12,26 @@ + + + + + + + + + + + + + + + + + + + +