Server-side dynamics
parent
eb9f2617ba
commit
7dd81ac2de
|
@ -15,6 +15,7 @@
|
||||||
******************************************************************************/
|
******************************************************************************/
|
||||||
package org.mitre.openid.connect.web;
|
package org.mitre.openid.connect.web;
|
||||||
|
|
||||||
|
import org.springframework.security.access.prepost.PreAuthorize;
|
||||||
import org.springframework.stereotype.Controller;
|
import org.springframework.stereotype.Controller;
|
||||||
import org.springframework.web.bind.annotation.RequestMapping;
|
import org.springframework.web.bind.annotation.RequestMapping;
|
||||||
|
|
||||||
|
@ -31,6 +32,7 @@ public class ManagerController {
|
||||||
return "home";
|
return "home";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@PreAuthorize("hasRole('ROLE_ADMIN')")
|
||||||
@RequestMapping("/admin/manage/clients")
|
@RequestMapping("/admin/manage/clients")
|
||||||
public String showClientManager() {
|
public String showClientManager() {
|
||||||
return "admin/manage/clients";
|
return "admin/manage/clients";
|
||||||
|
|
|
@ -1,10 +1,14 @@
|
||||||
|
<%@ taglib prefix="security" uri="http://www.springframework.org/security/tags" %>
|
||||||
|
|
||||||
<div class="span2">
|
<div class="span2">
|
||||||
<div class="well sidebar-nav">
|
<div class="well sidebar-nav">
|
||||||
<ul class="nav nav-list">
|
<ul class="nav nav-list">
|
||||||
<li class="nav-header">Administrative</li>
|
<security:authorize ifAllGranted="ROLE_ADMIN">
|
||||||
<li><a href="admin/manage/clients">Manage Clients</a></li>
|
<li class="nav-header">Administrative</li>
|
||||||
<li><a href="#">White Lists</a></li>
|
<li><a href="admin/manage/clients">Manage Clients</a></li>
|
||||||
<li><a href="#">Black Lists</a></li>
|
<li><a href="#">White Lists</a></li>
|
||||||
|
<li><a href="#">Black Lists</a></li>
|
||||||
|
</security:authorize>
|
||||||
<li class="nav-header">Personal</li>
|
<li class="nav-header">Personal</li>
|
||||||
<li><a href="#">Manage Sites</a></li>
|
<li><a href="#">Manage Sites</a></li>
|
||||||
<li><a href="#">Manage Active Tokens</a></li>
|
<li><a href="#">Manage Active Tokens</a></li>
|
||||||
|
|
|
@ -1,3 +1,4 @@
|
||||||
|
<%@ taglib prefix="security" uri="http://www.springframework.org/security/tags" %>
|
||||||
<div class="navbar navbar-fixed-top">
|
<div class="navbar navbar-fixed-top">
|
||||||
<div class="navbar-inner">
|
<div class="navbar-inner">
|
||||||
<div class="container-fluid">
|
<div class="container-fluid">
|
||||||
|
@ -14,7 +15,11 @@
|
||||||
<li><a href="#contact">Statistics</a></li>
|
<li><a href="#contact">Statistics</a></li>
|
||||||
<li><a href="#contact">Contact</a></li>
|
<li><a href="#contact">Contact</a></li>
|
||||||
</ul>
|
</ul>
|
||||||
<p class="navbar-text pull-right">Logged in as <a href="#">username</a></p>
|
<p class="navbar-text pull-right">
|
||||||
|
<security:authorize ifAllGranted="ROLE_USER">
|
||||||
|
Logged in as <a href="#"><%= request.getUserPrincipal().getName() %></a>
|
||||||
|
</security:authorize>
|
||||||
|
</p>
|
||||||
</div><!--/.nav-collapse -->
|
</div><!--/.nav-collapse -->
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -1,15 +1,18 @@
|
||||||
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
|
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
|
||||||
<%@ taglib prefix="o" tagdir="/WEB-INF/tags" %>
|
<%@ taglib prefix="o" tagdir="/WEB-INF/tags" %>
|
||||||
|
<%@ taglib prefix="security" uri="http://www.springframework.org/security/tags" %>
|
||||||
|
|
||||||
<o:header title="welcome"/>
|
<o:header title="welcome"/>
|
||||||
<o:topbar/>
|
<o:topbar/>
|
||||||
<div class="container-fluid">
|
<div class="container<security:authorize ifAllGranted="ROLE_USER">-fluid</security:authorize>">
|
||||||
<div class="row-fluid">
|
<div class="row<security:authorize ifAllGranted="ROLE_USER">-fluid</security:authorize>">
|
||||||
<o:sidebar/>
|
<security:authorize ifAllGranted="ROLE_USER">
|
||||||
<div class="span10">
|
<o:sidebar/>
|
||||||
|
</security:authorize>
|
||||||
|
<div<security:authorize ifAllGranted="ROLE_USER"> class="span10"</security:authorize>>
|
||||||
<!-- Main hero unit for a primary marketing message or call to action -->
|
<!-- Main hero unit for a primary marketing message or call to action -->
|
||||||
<div class="hero-unit">
|
<div class="hero-unit">
|
||||||
<h1>Welcome, User Name!</h1>
|
<h1>Welcome!</h1>
|
||||||
|
|
||||||
<p>Can't remember your passwords? Tired of filling out registration forms?
|
<p>Can't remember your passwords? Tired of filling out registration forms?
|
||||||
OpenID is a <strong>safe</strong>, <strong>faster</strong>, and <strong>easier</strong> way to log
|
OpenID is a <strong>safe</strong>, <strong>faster</strong>, and <strong>easier</strong> way to log
|
||||||
|
@ -19,7 +22,7 @@
|
||||||
<p><a class="btn btn-primary btn-large" href="http://openid.net/connect/">Learn more »</a></p>
|
<p><a class="btn btn-primary btn-large" href="http://openid.net/connect/">Learn more »</a></p>
|
||||||
</div>
|
</div>
|
||||||
<!-- Example row of columns -->
|
<!-- Example row of columns -->
|
||||||
<div class="row">
|
<div class="row<security:authorize ifAllGranted="ROLE_USER">-fluid</security:authorize>">
|
||||||
<div class="span6">
|
<div class="span6">
|
||||||
<h2>About</h2>
|
<h2>About</h2>
|
||||||
|
|
||||||
|
@ -46,7 +49,7 @@
|
||||||
</div>
|
</div>
|
||||||
<hr>
|
<hr>
|
||||||
<!-- Example row of columns -->
|
<!-- Example row of columns -->
|
||||||
<div class="row">
|
<div class="row<security:authorize ifAllGranted="ROLE_USER">-fluid</security:authorize>">
|
||||||
<div class="span12">
|
<div class="span12">
|
||||||
<h2>Current Statistics</h2>
|
<h2>Current Statistics</h2>
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue