Commit a83ac3f5 authored by Philipp Schafft's avatar Philipp Schafft 🦁

Feature: Allow mangement of <role>s via admin/ interface.

Updated admin/manageauth.xsl the way suggested by
0eb466b7.
closes #2123
parent 0eb466b7
...@@ -27,9 +27,9 @@ ...@@ -27,9 +27,9 @@
</xsl:for-each> </xsl:for-each>
</div> </div>
</xsl:if> </xsl:if>
<xsl:for-each select="source"> <xsl:for-each select="role">
<div class="roundbox"> <div class="roundbox">
<h3>Mountpoint <xsl:value-of select="@mount" /> <h3>Role <xsl:value-of select="@name" /> (<xsl:value-of select="@type" />)
<xsl:if test="server_name"> <xsl:if test="server_name">
<small><xsl:value-of select="server_name" /></small> <small><xsl:value-of select="server_name" /></small>
</xsl:if> </xsl:if>
...@@ -41,7 +41,7 @@ ...@@ -41,7 +41,7 @@
<li><a href="manageauth.xsl?mount={@mount}">Manage Authentication</a></li> <li><a href="manageauth.xsl?mount={@mount}">Manage Authentication</a></li>
<li><a href="killsource.xsl?mount={@mount}">Kill Source</a></li> <li><a href="killsource.xsl?mount={@mount}">Kill Source</a></li>
</ul> </ul>
<xsl:if test="User"> <xsl:if test="users">
<table class="colortable"> <table class="colortable">
<thead> <thead>
<tr> <tr>
...@@ -50,36 +50,44 @@ ...@@ -50,36 +50,44 @@
</tr> </tr>
</thead> </thead>
<tbody> <tbody>
<xsl:variable name="themount"><xsl:value-of select="@mount" /></xsl:variable> <xsl:for-each select="users/user">
<xsl:for-each select="User">
<tr> <tr>
<td> <td>
<xsl:value-of select="username" /> <xsl:value-of select="username" />
</td> </td>
<td> <td>
<a href="manageauth.xsl?mount={$themount}&amp;username={username}&amp;action=delete">Delete</a> <xsl:choose>
<xsl:when test="../../@can-deleteuser = 'true'">
<a href="manageauth.xsl?id={../../@id}&amp;username={username}&amp;action=delete">Delete</a>
</xsl:when>
<xsl:otherwise>
<xsl:text disable-output-escaping="yes">&amp;nbsp;</xsl:text>
</xsl:otherwise>
</xsl:choose>
</td> </td>
</tr> </tr>
</xsl:for-each> </xsl:for-each>
</tbody> </tbody>
</table> </table>
</xsl:if> </xsl:if>
<form class="alignedform" method="get" action="/admin/manageauth.xsl"> <xsl:if test="@can-adduser = 'true'">
<fieldset> <form class="alignedform" method="get" action="/admin/manageauth.xsl">
<legend>Add new user</legend> <fieldset>
<p> <legend>Add new user</legend>
<label for="username">Username:</label> <p>
<input type="text" id="username" name="username"/> <label for="username">Username:</label>
</p> <input type="text" id="username" name="username"/>
<p> </p>
<label for="password">Password:</label> <p>
<input type="password" id="password" name="password"/> <label for="password">Password:</label>
</p> <input type="password" id="password" name="password"/>
<input type="hidden" name="mount" value="{@mount}"/> </p>
<input type="hidden" name="action" value="add"/> <input type="hidden" name="id" value="{@id}"/>
<input type="Submit" value="Add"/> <input type="hidden" name="action" value="add"/>
</fieldset> <input type="Submit" value="Add"/>
</form> </fieldset>
</form>
</xsl:if>
</div> </div>
</xsl:for-each> </xsl:for-each>
<div id="footer"> <div id="footer">
...@@ -88,4 +96,4 @@ ...@@ -88,4 +96,4 @@
</body> </body>
</html> </html>
</xsl:template> </xsl:template>
</xsl:stylesheet> </xsl:stylesheet>
\ No newline at end of file
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment