Is there a way to override a group permission for a specific user?
Let's say a group1 don't have a permission to change bug status to closed. User A (who is part of group1) opens a bug and I want him to be able to close it later.
Is there a way to do that?
That's how I would do it. In his special group, you can set any restrictions you want. Plus if you ever have anyone else to control, you can put them into that group also. Note under the Group Setup Menu, in the Defects Tab, at the bottom is the "Delete Defect" permission and to the right is a box to check if only the owner can delete a defect.
There is a 'Bug_Defect_FieldCanChange' function in the Workflow that allows you to return 'True' to allow the field to change or 'False' to prevent the change. That is where you need to place the code to check who the 'Detected By' user is and compare it to the current user. If it's not the same person, return 'False' from the function.
Just a note... if the user group doesn't have permissions to change the field, nothing you can do in the workflow will grant that permission. You can only prevent actions to which a user already has permissions... you cannot add permissions.
There are several examples on the Mercury Support Site Knowledge Base about how to work with the workflow scripts. I suggest reviewing those to get a better idea of what you're capable of achieving in the workflow.