Ověřování uživatelů – konečně funguje ověřování uživatelů a odesílání souborů změn do úložiště
Na serveru je v hgrc potřeba nastavit:
allow_push = fiki
nebo jiný uživatel – vypropaguje se tam uživatel, který byl identifikován aplikačnímserverem.
1.1 --- a/java/hg-projekty/web/WEB-INF/sun-web.xml Mon Feb 16 21:21:34 2009 +0100
1.2 +++ b/java/hg-projekty/web/WEB-INF/sun-web.xml Sun Feb 22 00:36:01 2009 +0100
1.3 @@ -1,11 +1,15 @@
1.4 <?xml version="1.0" encoding="UTF-8"?>
1.5 <!DOCTYPE sun-web-app PUBLIC "-//Sun Microsystems, Inc.//DTD Application Server 9.0 Servlet 2.5//EN" "http://www.sun.com/software/appserver/dtds/sun-web-app_2_5-0.dtd">
1.6 <sun-web-app error-url="">
1.7 - <context-root>/hg-projekty</context-root>
1.8 - <class-loader delegate="true"/>
1.9 - <jsp-config>
1.10 - <property name="keepgenerated" value="true">
1.11 - <description>Keep a copy of the generated servlet class' java code.</description>
1.12 - </property>
1.13 - </jsp-config>
1.14 + <context-root>/hg-projekty</context-root>
1.15 + <class-loader delegate="true"/>
1.16 + <jsp-config>
1.17 + <property name="keepgenerated" value="true">
1.18 + <description>Keep a copy of the generated servlet class' java code.</description>
1.19 + </property>
1.20 + </jsp-config>
1.21 + <security-role-mapping>
1.22 + <role-name>opravneny</role-name>
1.23 + <group-name>uzivatel</group-name>
1.24 + </security-role-mapping>
1.25 </sun-web-app>
2.1 --- a/java/hg-projekty/web/WEB-INF/web.xml Mon Feb 16 21:21:34 2009 +0100
2.2 +++ b/java/hg-projekty/web/WEB-INF/web.xml Sun Feb 22 00:36:01 2009 +0100
2.3 @@ -17,10 +17,36 @@
2.4 <servlet-name>cgi</servlet-name>
2.5 <url-pattern>/hg/*</url-pattern>
2.6 </servlet-mapping>
2.7 + <servlet-mapping>
2.8 + <servlet-name>cgi</servlet-name>
2.9 + <url-pattern>/mercurial/*</url-pattern>
2.10 + </servlet-mapping>
2.11 <session-config>
2.12 - <session-timeout>30</session-timeout>
2.13 + <session-timeout>
2.14 + 30
2.15 + </session-timeout>
2.16 </session-config>
2.17 <welcome-file-list>
2.18 <welcome-file>index.jsp</welcome-file>
2.19 </welcome-file-list>
2.20 +
2.21 + <security-role>
2.22 + <role-name>opravneny</role-name>
2.23 + </security-role>
2.24 +
2.25 + <security-constraint>
2.26 + <web-resource-collection>
2.27 + <web-resource-name>Přístup pro zápis</web-resource-name>
2.28 + <url-pattern>/mercurial/*</url-pattern>
2.29 + </web-resource-collection>
2.30 + <auth-constraint>
2.31 + <role-name>opravneny</role-name>
2.32 + </auth-constraint>
2.33 + </security-constraint>
2.34 +
2.35 + <login-config>
2.36 + <auth-method>BASIC</auth-method>
2.37 + <realm-name>mercurial</realm-name>
2.38 + </login-config>
2.39 +
2.40 </web-app>