Skip to content

Commit 1027d04

Browse files
author
Johannes Gijsbers
committed
Hide registration link if the user doesn't have 'Web Registration' permission.
(patch [SF#828141]).
1 parent 69d7b27 commit 1027d04

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

templates/classic/html/page.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -76,8 +76,8 @@
7676
<input size="10" name="__login_name"><br>
7777
<input size="10" type="password" name="__login_password"><br>
7878
<input type="submit" name=":action" value="Login"><br>
79-
<span tal:replace="structure request/indexargs_form" />
80-
<a href="user?:template=register">Register</a><br>
79+
<a href="user?:template=register"
80+
tal:condition="python:request.user.hasPermission('Web Registration')">Register<br></a>
8181
<a href="user?:template=forgotten">Lost&nbsp;your&nbsp;login?</a><br>
8282
</p>
8383
</form>

templates/minimal/html/page.html

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,8 @@
3030
<input type="submit" name=":action" value="login">
3131
<span tal:replace="structure request/indexargs_form" />
3232
</form>
33-
<a href="user?:template=register">Register</a>
33+
<a tal:condition="python:request.user.hasPermission('Web Registration')"
34+
href="user?:template=register">Register</a>
3435
</p>
3536

3637
<p class="userblock" tal:condition="python:request.user.username != 'anonymous'">

0 commit comments

Comments
 (0)