Use callback of `setAllowedRotations` and promises