Assuming you're only interested in shell behaviour, there's a long and a short answer.
Short answer: no. The command that executes this functionality (Sitecore.Shell.Framework.Commands.CheckIn
) only allows the unlock action to happen if the user is an administrator or if the user owns the lock. This is regardless of permissions you set on the button item.
Longer answer: yes. But you need to write your own command to do the unlock. This is actually quite straight-forward. You create a new command, register it in configuration, and then replace the command name on the item with your own (or add an extra button).
What you do in your command will depend on your Sitecore version. Offhand, I don't know when the change came in, but I think that the same check present in the command used to be present in the item.Locking.Unlock()
method. If this doesn't work for you, you can cheat a bit and directly call ReleaseLock()
on the lock field (which you can get by using (LockField)item.Fields[FieldIDs.Lock]
).
You should make sure that your command performs the necessary security checks for your application; as you probably don't want it to be available to everyone.