Commit a59ea750 authored by Gradl, Tobias's avatar Gradl, Tobias
Browse files

412: Migrate security to new dariahsp (OPENED)

Task-Url: search#412
parent 90a8f05b
<%@ taglib prefix="tiles" uri="http://tiles.apache.org/tags-tiles" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ taglib prefix="s" uri="http://www.springframework.org/tags" %>
<%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions" %>
<tiles:importAttribute name="fluidLayout" />
......@@ -16,6 +17,16 @@
<label for="authorizedAs"><s:message code="~eu.dariah.de.minfba.common.titles.user_profile.autorized_as" /></label>
<input type="text" readonly class="form-control-plaintext" id="authorizedAs" value="${_auth.displayName==null?_auth.userId:_auth.displayName}">
</div>
<c:if test="${fn:length(_auth.roles)>0}">
<div class="form-group">
<label><s:message code="~eu.dariah.de.minfba.common.titles.user_profile.roles" /></label>
<ul>
<c:forEach items="${_auth.roles}" var="role">
<li>${role}</li>
</c:forEach>
</ul>
</div>
</c:if>
</form>
</c:when>
<c:otherwise>
......
<%@ page language="java" contentType="text/html;charset=UTF-8" pageEncoding="UTF-8" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ taglib prefix="s" uri="http://www.springframework.org/tags" %>
<%@ taglib prefix="sf" uri="http://www.springframework.org/tags/form" %>
<%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions" %>
<%@ taglib prefix="tiles" uri="http://tiles.apache.org/tags-tiles" %>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %>
<tiles:importAttribute name="fluidLayout" />
<div class="jumbotron">
<div class="container<c:if test="${fluidLayout==true}">-fluid</c:if>">
<div class="row">
<div class="xs-hidden sm-visible col-sm-3 col-lg-2 col-sm-offset-1">
<div class="pull-right dariah-flower-white-83">DARIAHSP Test App</div>
</div>
</div>
</div>
</div>
<div class="container<c:if test="${fluidLayout==true}">-fluid</c:if>">
<div class="row">
<div id="main-content-wrapper" class="col-sm-10 col-sm-offset-1">
<ul class="breadcrumb">
<li class="active">User profile</li>
</ul>
<div id="main-content">
<h2>Home</h2>
<form class="form-horizontal">
<fieldset>
<legend>Information from your identity providers</legend>
<div class="form-group">
<label class="col-sm-3 control-label" for="user_endpoint">Original identity Provider: </label>
<div class="col-sm-9">
<p class="form-control-static">${user.endpointName}</p>
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label" for="user_username">Username: </label>
<div class="col-sm-9">
<p class="form-control-static">${user.username}</p>
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label" for="user_username">Home IdP Attributes: </label>
<div class="col-sm-9">
<c:if test="${user.originalAttributes!=null}">
<ul class="form-control-static" style="padding-left: 20px;">
<c:forEach items="${user.originalAttributes}" var="attr">
<li><strong>${attr.friendlyName}</strong>: ${attr.value}</li>
</c:forEach>
</ul>
</c:if>
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label" for="user_username">Aggregated attributes: </label>
<div class="col-sm-9">
<c:if test="${user.aggregatedAttributes!=null}">
<ul class="form-control-static" style="padding-left: 20px;">
<c:forEach items="${user.aggregatedAttributes}" var="attr">
<li><strong>${attr.friendlyName}</strong>: ${attr.value}</li>
</c:forEach>
</ul>
</c:if>
</div>
</div>
<legend>Your assigned privileges</legend>
<div class="form-group">
<label class="col-sm-3 control-label" for="user_roles">Assigned roles: </label>
<div class="col-sm-9">
<select class="form-control uneditable-input" multiple id="user_roles">
<c:forEach items="${authorityList}" var="authority">
<option>${authority.authority}</option>
</c:forEach>
</select>
</div>
</div>
</fieldset>
</form>
</div>
</div>
</div>
</div>
<%@ page language="java" contentType="text/html;charset=UTF-8" pageEncoding="UTF-8" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ taglib prefix="s" uri="http://www.springframework.org/tags" %>
<%@ taglib prefix="sf" uri="http://www.springframework.org/tags/form" %>
<%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions" %>
<%@ taglib prefix="tiles" uri="http://tiles.apache.org/tags-tiles" %>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %>
<tiles:importAttribute name="fluidLayout" />
<div class="jumbotron">
<div class="container<c:if test="${fluidLayout==true}">-fluid</c:if>">
<div class="row">
<div class="xs-hidden sm-visible col-sm-3 col-lg-2 col-sm-offset-1">
<div class="pull-right dariah-flower-white-83">DARIAHSP Test App</div>
</div>
</div>
</div>
</div>
<div class="container<c:if test="${fluidLayout==true}">-fluid</c:if>">
<div class="row">
<div id="main-content-wrapper" class="col-sm-10 col-sm-offset-1">
<ul class="breadcrumb">
<li class="active">Home</li>
</ul>
<div id="main-content">
<h2>Insufficient Information</h2>
<p>Your home organisation did not provide sufficient attributes to this service.
In 10 seconds you will be redirected to the <a target="_self" href="${redirectUrl}">DARIAH central user registry</a> and complete your profile in order to use this service.</p>
<p>After Registration, you will be able to access your resources provided you are authorized.</p>
<h3>Actions</h3>
Either access the <strong><a target="_self" href="${redirectUrl}">DARIAH central user registry</a></strong> to complete your profile or<br />
<strong><a target="_self" href='<s:url value="/logout" />'>Logout</a></strong> to use this tool as unauthenticated user (if possible).
<h3>More Details</h3>
Home Organisation Name: <b>${user.endpointName}</b><br/>
Home Organisation entityID: <b>${user.endpointId}</b><br/>
You were trying to access the following URL: <b>${returnUrl}</b>
<script type="text/javascript">
<!--
//setTimeout(function() { window.location = "${redirectUrl}" }, 5000);
//-->
</script>
</div>
</div>
</div>
</div>
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