문제

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<Permission> 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

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top