finish portal management function