Server-side dynamics
parent
eb9f2617ba
commit
7dd81ac2de
|
@ -15,6 +15,7 @@
|
|||
******************************************************************************/
|
||||
package org.mitre.openid.connect.web;
|
||||
|
||||
import org.springframework.security.access.prepost.PreAuthorize;
|
||||
import org.springframework.stereotype.Controller;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
|
||||
|
@ -31,6 +32,7 @@ public class ManagerController {
|
|||
return "home";
|
||||
}
|
||||
|
||||
@PreAuthorize("hasRole('ROLE_ADMIN')")
|
||||
@RequestMapping("/admin/manage/clients")
|
||||
public String showClientManager() {
|
||||
return "admin/manage/clients";
|
||||
|
|
|
@ -1,10 +1,14 @@
|
|||
<%@ taglib prefix="security" uri="http://www.springframework.org/security/tags" %>
|
||||
|
||||
<div class="span2">
|
||||
<div class="well sidebar-nav">
|
||||
<ul class="nav nav-list">
|
||||
<li class="nav-header">Administrative</li>
|
||||
<li><a href="admin/manage/clients">Manage Clients</a></li>
|
||||
<li><a href="#">White Lists</a></li>
|
||||
<li><a href="#">Black Lists</a></li>
|
||||
<security:authorize ifAllGranted="ROLE_ADMIN">
|
||||
<li class="nav-header">Administrative</li>
|
||||
<li><a href="admin/manage/clients">Manage Clients</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><a href="#">Manage Sites</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-inner">
|
||||
<div class="container-fluid">
|
||||
|
@ -14,7 +15,11 @@
|
|||
<li><a href="#contact">Statistics</a></li>
|
||||
<li><a href="#contact">Contact</a></li>
|
||||
</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>
|
||||
</div>
|
||||
|
|
|
@ -1,15 +1,18 @@
|
|||
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
|
||||
<%@ taglib prefix="o" tagdir="/WEB-INF/tags" %>
|
||||
<%@ taglib prefix="security" uri="http://www.springframework.org/security/tags" %>
|
||||
|
||||
<o:header title="welcome"/>
|
||||
<o:topbar/>
|
||||
<div class="container-fluid">
|
||||
<div class="row-fluid">
|
||||
<o:sidebar/>
|
||||
<div class="span10">
|
||||
<div class="container<security:authorize ifAllGranted="ROLE_USER">-fluid</security:authorize>">
|
||||
<div class="row<security:authorize ifAllGranted="ROLE_USER">-fluid</security:authorize>">
|
||||
<security:authorize ifAllGranted="ROLE_USER">
|
||||
<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 -->
|
||||
<div class="hero-unit">
|
||||
<h1>Welcome, User Name!</h1>
|
||||
<h1>Welcome!</h1>
|
||||
|
||||
<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
|
||||
|
@ -19,7 +22,7 @@
|
|||
<p><a class="btn btn-primary btn-large" href="http://openid.net/connect/">Learn more »</a></p>
|
||||
</div>
|
||||
<!-- Example row of columns -->
|
||||
<div class="row">
|
||||
<div class="row<security:authorize ifAllGranted="ROLE_USER">-fluid</security:authorize>">
|
||||
<div class="span6">
|
||||
<h2>About</h2>
|
||||
|
||||
|
@ -46,7 +49,7 @@
|
|||
</div>
|
||||
<hr>
|
||||
<!-- Example row of columns -->
|
||||
<div class="row">
|
||||
<div class="row<security:authorize ifAllGranted="ROLE_USER">-fluid</security:authorize>">
|
||||
<div class="span12">
|
||||
<h2>Current Statistics</h2>
|
||||
|
||||
|
|
Loading…
Reference in New Issue