开发者

IdentityManager seam problem

I have a problem with IdentityManager and seam. I explain my problem:

In my application, I have a page to add permission to a role. The method to save it is here:

   JpaPermissionStore jpaPermissionStore = (JpaPermissionStore) Component.getInstance("org.jboss.seam.security.jpaPermissionStore", true);
    List<Permi开发者_开发知识库ssion> permissions = new ArrayList<Permission>();
    for (String s : this.selectedActions)
        permissions.add(new Permission(this.selectedTarget, s, new org.jboss.seam.security.Role(role)));
    if (permissions.size() > 0)
        jpaPermissionStore.grantPermissions(permissions);
    Conversation.instance().end();

All work fine with this method. Permissions are added in database.

But after to have save permission, the application redirect the user in a page which list role with permissions.

In this page, the new permission doesn't appear. After research the problem, it seem the identityManager haven't load permission from database.

So my question is:

How to refresh identityManager to force it to refresh data ?

Thanks.


You need to refresh the roles of the identity manually. You should check out this post

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜