MDL-45678 assignsubmission_comments: Improve performance for permissions checking