按照如下步骤改变安全角色。
创建名为BPEUser的安全角色。
添加安全角色administrator。
测试调用者是否有指定的安全角色。
(StringroleName) Test if the caller has a given security role.
测试调用者是否有指定的安全角色。
然而,以粗体显示的安全角色是这里讨论的重点。
设置安全和绑定安全角色。
role-name元素指定安全角色的名称。
The role-name element specifies the name of the security role.
对于每个安全角色,必须声明相应的主体类及其名称。
For each security role, a corresponding principal class and its name must be declared.
我们对每个要映射的安全角色使用一个role元素。
在此部分,我们将了解如何定义安全角色和配置方法权限。
In this section we see how to define security roles and configure method permissions.
单击add添加一个名为everyone的安全角色。
图22显示了正在链接到适当安全角色的安全性角色引用。
Figure 22 shows the security role Reference being linked to the appropriate security role.
单击Gather显示前面定义的在ear层的安全角色。
Click Gather to display the security roles we defined previously at the EAR level.
回忆一下您刚才在web . xml文件中定义了两个安全角色。
Recall that you defined two security roles in the web.xml file.
isUserInRole:此方法判定远程用户是否具有特定的安全角色。
IsUserInRole: This method determines whether a remote user is in a specific security role.
isUserInRole:此方法判定远程用户是否具有特定的安全角色。
IsUserInRole: This method determines whether a remote user is in a specific security role.
应用推荐