use the new beforecreateportal event to not duplicate as much code, see: https://github.com/boundlessgeo/gxp/pull/222