[原] XAF 如何用权限使不同部门的管理人员管理其部门员工信息

1.http://www.devexpress.com/Support/Center/Example/Details/E4045

This example demonstrates how to use the new security system to implement the subject.
Basically, the following scenario is implemented:

- Users (Joe, John) can do everything with their own tasks and can also view data of their own department;

- Managers (Sam, Mary) can manage their own department, its employees, their tasks, etc. However, they cannot access data from other departments;

- Administrators (Admin) can do everything within the application.

You can see how it works in action at http://screencast.com/t/74PJlzSnKDR (you can run EasyTests in the MainDemo.EasyTests\E4045.ets file).
To do this, permissions at the type and object level (with a criteria) are configured. You can see the respective setup code for permissions in the DatabaseUpdate/Updater file.

Take special note that for building a complex criteria against associated objects, the JoinOperand together with the built-in CurrentUserId and IsCurrentUserInRole criteria functions.

To quickly understand relationships between involved business classes, their class diagram is attached.

 

转载于:https://www.cnblogs.com/Tonyyang/archive/2012/08/10/2631324.html

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值