Pre-receive hook with webui


#1

Hello,
I have created a pre-receive hook in order to limit push for some users only on some authorized branches.
This is working well when using “git push”.
But it seems that the hook is not executed when the push is done on the webui. The user is able to push new files in unauthorized branches.
Please, do you confirm that the hook is not executed when using the webui? Or do I miss something?

After more tests, I see that the hook is well executed but not the custom hook.
I see also that I have no way to get the user when the hook is executed following a push on the webui. There is no GOGS_xxxx environment variables.

Many thanks for your help.


#2

Try to upgrade your Gogs to latest master branch.