{
list = permissions.iterator();
while (list.hasNext())
{
JSPermission _js = (JSPermission)list.next();
PortalResourcePermission perm = _js.getPermissionForType();
if ((perm != null) && (perm instanceof PortalResourcePermission))
{
try
{
pm.addPermission(perm);