"org.jboss.seam.security.identity", midentity);
Contexts.getSessionContext().set(
"org.drools.guvnor.client.rpc.RepositoryService", impl);
List<RoleBasedPermission> pbps = new ArrayList<RoleBasedPermission>();
pbps.add(new RoleBasedPermission("jervis",
RoleTypes.PACKAGE_READONLY,
package1Name, null));
pbps.add(new RoleBasedPermission("jervis",
RoleTypes.PACKAGE_DEVELOPER,
package2Name, null));
pbps.add(new RoleBasedPermission("jervis",
RoleTypes.ANALYST_READ,
null, category1Name));
MockRoleBasedPermissionStore store = new MockRoleBasedPermissionStore(pbps);
Contexts.getSessionContext().set("org.drools.guvnor.server.security.RoleBasedPermissionStore", store);