Browse Source

需求单No.138716 屠宰分割客户端实现按登录用户进行权限划分,每个客户端只有后台配置用户有权限登录才能操作。

master
yibo 7 years ago
parent
commit
3c2850c4e7
3 changed files with 28 additions and 2 deletions
  1. +6
    -0
      B3ClientService/Rpcs/UserInfoRpc.cs
  2. +2
    -2
      B3ClientService/Tasks/SyncInfoFromServer.cs
  3. +20
    -0
      WebFolder/config/plugins/B3ClientService.plugin

+ 6
- 0
B3ClientService/Rpcs/UserInfoRpc.cs View File

@ -32,5 +32,11 @@ namespace BWP.B3ClientService.Rpcs
query.Range = SelectRange.Top(1);
return query.EExecuteScalar<EmpInfoTable>();
}
[Rpc]
public static bool UserIsInRole(string roleName)
{
return BLContext.Current.User.IsInRole("B3ClientService." + roleName);
}
}
}

+ 2
- 2
B3ClientService/Tasks/SyncInfoFromServer.cs View File

@ -198,7 +198,7 @@ namespace BWP.B3ClientService.Tasks
entity.Name = o.Get<string>("Name");
entity.Stopped = o.Get<bool>("Stopped");
entity.Password = o.Get<byte[]>("Password");
entity.RoleSchema = o.Get<string>("RoleSchema");
entity.RoleSchema = "default";//o.Get<string>("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<string>("Department_Name");
entity.AccountingUnit_ID = o.Get<long?>("AccountingUnit_ID");
entity.AccountingUnit_Name = o.Get<string>("AccountingUnit_Name");
entity.Role = o.Get<string>("Role");
//entity.Role = o.Get<string>("Role");
context.Session.Insert(entity);
}
context.Commit();


+ 20
- 0
WebFolder/config/plugins/B3ClientService.plugin View File

@ -12,6 +12,26 @@
<Profiles>
</Profiles>
<Security>
<FunctionGroup name="收购业务" roleSchemas="default">
<Function index="0" name="过磅单"/>
<Function index="1" name="验质分圈"/>
<Function index="2" name="排宰顺序"/>
<Function index="3" name="急宰打码"/>
<Function index="4" name="线下验质分圈"/>
<Function index="5" name="线下排宰顺序"/>
<Function index="6" name="顺序确认"/>
<Function index="7" name="烫毛计数"/>
<Function index="8" name="掉猪处理"/>
<Function index="9" name="称重定级"/>
<Function index="10" name="定级校验"/>
</FunctionGroup>
<FunctionGroup name="车间业务" roleSchemas="default">
<Function index="0" name="白条入库"/>
<Function index="1" name="领料退料"/>
<Function index="2" name="分割称重"/>
<Function index="3" name="分割入库"/>
<Function index="4" name="车间配货"/>
</FunctionGroup>
</Security>
<Features>
</Features>


Loading…
Cancel
Save