LPS-39735 - part one

Hi Brian,

sending you the smallest possible changes for https://issues.liferay.com/browse/LPS-39735, this is the first commit of https://github.com/brianchandotcom/liferay-portal/pull/13753

The idea here is to check permissions first. We shouldn't allow to create preferences before checking permissions.

Thanks.