We suggest how to fix it.
Windows 7 won't turn off and restart
A growing group of Windows 7 users reports about serious problems with restarting and shutting down your devices. People using Microsoft software say that their computers have started displaying a message with quite absurd content "You don't have permission to shut down this computer" ("You don't have permission to shut down this computer"). The main concern is that Microsoft does not have to fix this bug. Fortunately, there are some solutions to this issue.
1. Press the Win + R key combination to use the "Run" function.
2. Type gpedit.msc and press enter.
3. In the Group Policy editor, go to the computer configuration section, and then Windows settings -> security -> local policy -> security options
4. In the right panel of the security options find and double-click on "User Account Control: Run all administrators in Admin Approval Mode" or equivalent in Polish.
5. In a new window, enable this function.
6. Use the Win + R combination again and type gpupdate / force in the "Run" box and press Enter.
After the above, the computer should turn off and restart without any problems. The alternative method involves creating a new admin account every time and is absurdly inconvenient, so … you better stay with this method, which should also work after restarting the computer.
If you continue to use Windows 7 stubbornly, then you probably have to focus on the growing number of problems of this type. I highly recommend you consider it alternatives to Windows 7 or free upgrade to Windows 10.