Code

Hide registration link if the user doesn't have the 'Web Registration'
authorjlgijsbers <jlgijsbers@57a73879-2fb5-44c3-a270-3262357dd7e2>
Sat, 25 Oct 2003 10:59:50 +0000 (10:59 +0000)
committerjlgijsbers <jlgijsbers@57a73879-2fb5-44c3-a270-3262357dd7e2>
Sat, 25 Oct 2003 10:59:50 +0000 (10:59 +0000)
permission. (patch #828141).

git-svn-id: http://svn.roundup-tracker.org/svnroot/roundup/trunk@1935 57a73879-2fb5-44c3-a270-3262357dd7e2

templates/classic/html/page.html
templates/minimal/html/page.html

index 33c22b4dded9f667c247859a7fc1755378bbc61f..6f0603f9bdc9854abb60f2cf182a0b1015051732 100644 (file)
@@ -76,8 +76,8 @@
     <input size="10" name="__login_name"><br>
     <input size="10" type="password" name="__login_password"><br>
     <input type="submit" name=":action" value="Login"><br>
-    <span tal:replace="structure request/indexargs_form" />
-    <a href="user?:template=register">Register</a><br>
+    <a href="user?:template=register"
+       tal:condition="python:request.user.hasPermission('Web Registration')">Register<br></a>
     <a href="user?:template=forgotten">Lost&nbsp;your&nbsp;login?</a><br>
    </p>
   </form>
index 10834fddd4ddca677ed15c93b452f4f4dc3aba70..87517c223c3b2d5649b106a46d396a99d8ea4bfb 100644 (file)
@@ -30,7 +30,8 @@
     <input type="submit" name=":action" value="login">
     <span tal:replace="structure request/indexargs_form" />
    </form>
-   <a href="user?:template=register">Register</a>
+   <a tal:condition="python:request.user.hasPermission('Web Registration')"
+      href="user?:template=register">Register</a>
   </p>
 
   <p class="userblock" tal:condition="python:request.user.username != 'anonymous'">