edited post controller to check post author for validation