Commit 36bc7aaf authored by Gradl, Tobias's avatar Gradl, Tobias
Browse files

71: Security (mainly admin sections)

Task-Url: https://pm.winseda.de/issues/71
parent 51e32267
......@@ -86,7 +86,7 @@
</li>
</c:if>
</ul>
<c:if test="${crawl.online}">
<c:if test="${crawl.online && _auth.level >= 100}">
<td>
<c:if test="${state=='ok'}">
<button type="button" onclick="editor.performOffline('${crawl.id}');" class="btn btn-link"><i class="fa fa-repeat"></i> <s:message code="~eu.dariah.de.minfba.search.actions.crawls.reindex" /></button><br />
......
......@@ -12,13 +12,15 @@
<div id="collections-table-container" class="col-lg-12">
<h2 class="pull-left">
<s:message code="~eu.dariah.de.minfba.search.view.titles.collection_management" />
<c:if test="${_auth==null || _auth.auth==false}"><small>&nbsp;<span class="glyphicon glyphicon-lock pull-right" data-toggle="tooltip" data-placement="left" title="<s:message code="~eu.dariah.de.minfba.common.notification.limited_access" />"></span></small></c:if>
<c:if test="${_auth==null || _auth.auth==false || _auth.level < 100}"><small>&nbsp;<span class="glyphicon glyphicon-lock pull-right" data-toggle="tooltip" data-placement="left" title="<s:message code="~eu.dariah.de.minfba.common.notification.limited_access" />"></span></small></c:if>
</h2>
<div class="pull-right">
<c:if test="${_auth.level >= 100}">
<button id="btn-resync-colreg" class="btn btn-default btn-sm">
<span class="glyphicon glyphicon-refresh"></span> <s:message code="~eu.dariah.de.minfba.common.actions.synchronize" />
</button>
</c:if>
<div class="data-table-filter pull-left">
......
......@@ -123,9 +123,11 @@
<c:set var="prefix_state" value="state-warning" />
</c:otherwise>
</c:choose>
<div class="inline-button ${prefix_state}" onclick="editor.editPrefix('${ep.id}','${ds.id}','${ds.remoteAlias}', '.oaipmh-metadata-prefix');">
<i class="fa fa-pencil-square-o"></i> <span class="oaipmh-metadata-prefix">${prefix}</span>
</div>
<c:if test="${_auth.level >= 100}">
<div class="inline-button ${prefix_state}" onclick="editor.editPrefix('${ep.id}','${ds.id}','${ds.remoteAlias}', '.oaipmh-metadata-prefix');">
<i class="fa fa-pencil-square-o"></i> <span class="oaipmh-metadata-prefix">${prefix}</span>
</div>
</c:if>
</li>
</c:if>
<li>
......@@ -135,7 +137,7 @@
<li>
<span class="state-heading"><s:message code="~eu.dariah.de.minfba.search.metamodel_view.endpoint.document_count" />:</span>
<span class="no-break-out"><fmt:formatNumber value="${ds.docs}" /></span>
<c:if test="${ds.docs > 0}">
<c:if test="${ds.docs > 0 && _auth.level >= 100}">
<div class="inline-button ${prefix_state}" onclick="editor.clearEndpointSchemaIndex('${ep.id}','${ds.id}');">
<i class="fa fa-trash"></i> <s:message code="~eu.dariah.de.minfba.common.actions.clear" />
</div>
......@@ -151,14 +153,16 @@
</table>
<h4><s:message code="~eu.dariah.de.minfba.search.view.titles.crawls" /></h4>
<c:choose>
<c:when test="${ds_status!='info'}">
<button onclick="editor.crawlOnline('${ep.id}','${ds.id}');" class="btn btn-default"><i class="fa fa-refresh"></i><s:message code="~eu.dariah.de.minfba.search.view.crawl.crawl_online" /></button><br />
</c:when>
<c:otherwise>
<s:message code="~eu.dariah.de.minfba.search.view.crawl.no_actions" />
</c:otherwise>
</c:choose>
<c:if test="${_auth.level >= 100}">
<c:choose>
<c:when test="${ds_status!='info'}">
<button onclick="editor.crawlOnline('${ep.id}','${ds.id}');" class="btn btn-default"><i class="fa fa-refresh"></i><s:message code="~eu.dariah.de.minfba.search.view.crawl.crawl_online" /></button><br />
</c:when>
<c:otherwise>
<s:message code="~eu.dariah.de.minfba.search.view.crawl.no_actions" />
</c:otherwise>
</c:choose>
</c:if>
<div class="previous-crawls-container">
......
......@@ -18,9 +18,11 @@
</h2>
<div class="pull-right">
<button id="btn-sync" class="btn btn-default btn-sm">
<span class="glyphicon glyphicon-refresh"></span> <s:message code="~eu.dariah.de.minfba.common.actions.synchronize" />
</button>
<c:if test="${_auth.level >= 100}">
<button id="btn-sync" class="btn btn-default btn-sm">
<span class="glyphicon glyphicon-refresh"></span> <s:message code="~eu.dariah.de.minfba.common.actions.synchronize" />
</button>
</c:if>
<div class="data-table-filter pull-left">
<input type="text" class="form-control input-sm" placeholder='<s:message code="~eu.dariah.de.minfba.common.data_tables.filter_paceholder" />'>
......
......@@ -12,6 +12,8 @@
</c:otherwise>
</c:choose>
<input type="hidden" id="ulevel" value="${_auth.level}" />
<header role="banner" class="navbar navbar-default navbar-static-top <c:if test="${navbarInverse==true}">navbar-inverse</c:if>">
<div class="container<c:if test="${fluidLayout==true}">-fluid</c:if>">
<div class="row">
......
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