Yes, hours can be logged only for items that are assigned to you and unassigned items. You cannot log hours for the items assigned to others members in the sprint or project. Only the Team Owner, Admin, and Sprint Owner of the sprint can log hours for all the work items in a sprint.