[BUGFIX] Prevent a security context exception in Rating widget

An additional check securityContext->canBeInitialized() is done
prior to invoking the SecurityContext->getParty(). This prevents
the exception `The security Context cannot be initialized yet. Please
check if it can be initialized with $securityContext->canBeInitialized()
before trying to do so.`.