我正在使用 seam 3 和 cdi 创建一个应用程序。我从一个例子开始,对于这样的安全部分:
public @ConversationScoped class UserAction {
public @Admin void deleteUser(String userId) {
// code
}
}
有用。如果我的用户具有管理员角色,则他有权访问。但是我怎样才能实现用户可能有一个规则或另一个规则的情况呢?例如:如果我的用户是@Admin 或@Student,他可以访问它,但如果他是@Teacher,他不能。
谢谢。
凯利