{"thread":{"id":"44434","subject":"Forbid access to /gitweb but authorize the sub projets","startedAt":"2016-11-07T13:16:25Z","lastAt":"2016-11-09T08:25:59Z","messageCount":2,"participants":["Alexandre Duplaix","Dennis Kaarsemaker"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"305483","messageId":"58207CAB.3060105@sagemcom.com","threadId":"44434","inReplyTo":null,"subject":"Forbid access to /gitweb but authorize the sub projets","fromName":"Alexandre Duplaix","fromEmail":"alexandre.duplaix-ext@sagemcom.com","sentAt":"2016-11-07T13:07:55Z","receivedAt":"2016-11-07T13:16:25Z","isPatch":false,"sender":{"key":"alexandre.duplaix-ext@sagemcom.com","avatar":null},"body":"Hello,\n\nI have several projects under https://myserver/gitweb and I would like \nto forbid the access to the root, so that the users can't list the \ndifferents projects.\n\nHowever, I need to let the access to the sub projects (ex: \nhttps://myserver/gitweb/?p=project1;a=summary\n\nHow can I do please ?\n\nThank you in advance :)\n\n\" Ce courriel et les documents qui lui sont joints peuvent contenir des\ninformations confidentielles ou ayant un caract�re priv�. \nS'ils ne vous sont pas destin�s nous vous signalons qu'il est strictement interdit de les\ndivulguer, de les reproduire ou d'en utiliser de quelque mani�re que ce\nsoit le contenu. Si ce message vous a �t� transmis par erreur, merci d'en\ninformer l'exp�diteur et de supprimer imm�diatement de votre syst�me\ninformatique ce courriel ainsi que tous les documents qui y sont attach�s\"\n\n                               ******\n\n\" This e-mail and any attached documents may contain confidential or\nproprietary information. If you are not the intended recipient, you are\nnotified that any dissemination, copying of this e-mail and any attachments\nthereto or use of their contents by any means whatsoever is strictly\nprohibited. If you have received this e-mail in error, please advise the\nsender immediately and delete this e-mail and all attached documents\nfrom your computer system.\"\n#\n\n"},{"id":"305618","messageId":"1478679951.12904.1.camel@kaarsemaker.net","threadId":"44434","inReplyTo":"58207CAB.3060105@sagemcom.com","subject":"Re: Forbid access to /gitweb but authorize the sub projets","fromName":"Dennis Kaarsemaker","fromEmail":"dennis@kaarsemaker.net","sentAt":"2016-11-09T08:25:51Z","receivedAt":"2016-11-09T08:25:59Z","isPatch":false,"sender":{"key":"dennis@kaarsemaker.net","avatar":"https://avatars.githubusercontent.com/u/200649?v=4"},"body":"On Mon, 2016-11-07 at 14:07 +0100, Alexandre Duplaix wrote:\n> Hello,\n> \n> I have several projects under https://myserver/gitweb and I would like \n> to forbid the access to the root, so that the users can't list the \n> differents projects.\n> \n> However, I need to let the access to the sub projects (ex: \n> https://myserver/gitweb/?p=project1;a=summary\n> \n> How can I do please ?\n\nMy favourite way of doing this is abusing the fact that gitweb.conf is\nperl code that's loaded with do $filename.\n\nThis makes it easy to override such things. Try this in gitweb.conf for example:\n\nsub no_index {\n    die_error(403, \"No access to the repository list\");\n}\n$actions{project_list} = \\&no_index;\n$actions{project_index} = \\&no_index;\n$actions{opml} = \\&no_index;\n\n-- \nDennis Kaarsemaker\nhttp://www.kaarsemaker.net\n"}]}