-
Notifications
You must be signed in to change notification settings - Fork 76
/
examples.html
119 lines (101 loc) · 3.9 KB
/
examples.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
<!DOCTYPE html>
<html lang="en" xmlns:shiro="https://www.github.com/theborakompanioni/thymeleaf-extras-shiro">
<head>
<meta charset="UTF-8"/>
<title>Shiro Tags Usage With Thymeleaf</title>
</head>
<body>
<h3>shiro:guest</h3>
<shiro:guest>
<p>Hi there! Please <a href="login.html">Login</a> or <a href="signup.html">Signup</a> today!</p>
</shiro:guest>
<p shiro:guest="">
Hi there! Please <a href="login.html">Login</a> or <a href="signup.html">Signup</a> today!
</p>
<h3>shiro:user</h3>
<shiro:user>
<div>Welcome back John! Not John? Click <a href="login.html">here</a> to login.</div>
</shiro:user>
<div shiro:user="">
Welcome back John! Not John? Click <a href="login.html">here</a> to login.
</div>
<h3>shiro:authenticated</h3>
<shiro:authenticated>
<a href="updateAccount.html">Update your contact information</a>.
</shiro:authenticated>
<div shiro:authenticated="">
<a href="updateAccount.html">Update your contact information</a>.
</div>
<h3>shiro:notAuthenticated</h3>
<shiro:notAuthenticated>
Please <a href="login.html">login</a> in order to update your credit card information.
</shiro:notAuthenticated>
<p shiro:notAuthenticated="">
Please <a href="login.html">login</a> in order to update your credit card information.
</p>
<h3>shiro:principal</h3>
<p>Hello,
<shiro:principal/>
, how are you today?
</p>
<p>User ID:
<shiro:principal type="java.lang.Integer"/>
</p>
<p>Hello, <span shiro:principal=""/>, how are you today?</p>
<p>User ID: <span shiro:principal="" type="java.lang.Integer"/></p>
<h3>shiro:hasRole</h3>
<shiro:hasRole name="administrator">
<a href="admin.html">Administer the system</a>
</shiro:hasRole>
<div shiro:hasRole="administrator">
<a href="admin.html">Administer the system</a>
</div>
<h3>shiro:lacksRole</h3>
<shiro:lacksRole name="administrator">
Sorry, you are not allowed to administer the system.
</shiro:lacksRole>
<div shiro:lacksRole="administrator">
Sorry, you are not allowed to administer the system.
</div>
<h3>shiro:hasAllRoles</h3>
<shiro:hasAllRoles name="developer, project manager">
<p>You are a developer and a project manager.</p>
</shiro:hasAllRoles>
<p shiro:hasAllRoles="developer, project manager">
You are a developer and a project manager.
</p>
<h3>shiro:hasAnyRoles</h3>
<shiro:hasAnyRoles name="developer, project manager, administrator">
<p>You are a developer, project manager, or administrator.</p>
</shiro:hasAnyRoles>
<p shiro:hasAnyRoles="developer, project manager, administrator">
You are a developer, project manager, or administrator.
</p>
<h3>shiro:hasPermission</h3>
<shiro:hasPermission name="user:create">
<a href="createUser.html">Create a new User</a>
</shiro:hasPermission>
<a shiro:hasPermission="user:create" href="createUser.html">Create a new User</a>
<h3>shiro:lacksPermission</h3>
<shiro:lacksPermission name="user:delete">
Sorry, you are not allowed to delete user accounts.
</shiro:lacksPermission>
<span shiro:lacksPermission="user:delete">
Sorry, you are not allowed to delete user accounts.
</span>
<h3>shiro:hasAllPermissions</h3>
<shiro:hasAllPermissions name="user:create, user:delete">
<p>You can create and delete users.</p>
</shiro:hasAllPermissions>
<p shiro:hasAllPermissions="user:create, user:delete">
You can create and delete users.
</p>
<h3>shiro:hasAnyPermissions</h3>
<shiro:hasAnyPermissions name="user:create, user:delete">
<p>You can create or delete users.</p>
</shiro:hasAnyPermissions>
<p shiro:hasAnyPermissions="user:create, user:delete">
You can create or delete users.
</p>
</body>
</html>