If a user has OVERRIDE_CHECKOUT permissions, the edit_file_entry.jsp will render wrong buttons because it thinks, that the file was locked. The relevant code is here:
Steps to reproduce:
1. Create a new file with view, edit and delete permissions for user role
2. "edit" file and check buttons with a non-admin user
You will see "Publish", "Checkout" and "Abort" buttons
3. Give user role override checkout permissions on the file
4. "edit" file again with non-admin user
Now the "Checkout" button is gone and you have "Save and Checkin" and "Cancel and Checkout" buttons.
The code in current master differs, so maybe it's already fixed, not sure about it.