1 | /* |
---|
2 | * Nimble, an extensive application base for Grails |
---|
3 | * Copyright (C) 2009 Intient Pty Ltd |
---|
4 | * |
---|
5 | * Licensed under the Apache License, Version 2.0 (the "License"); |
---|
6 | * you may not use this file except in compliance with the License. |
---|
7 | * You may obtain a copy of the License at |
---|
8 | * |
---|
9 | * http://www.apache.org/licenses/LICENSE-2.0 |
---|
10 | * |
---|
11 | * Unless required by applicable law or agreed to in writing, software |
---|
12 | * distributed under the License is distributed on an "AS IS" BASIS, |
---|
13 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
---|
14 | * See the License for the specific language governing permissions and |
---|
15 | * limitations under the License. |
---|
16 | */ |
---|
17 | |
---|
18 | /** |
---|
19 | * Outlines a default set of recommended URL mappings for Nimble components. |
---|
20 | * |
---|
21 | * @author Bradley Beddoes |
---|
22 | */ |
---|
23 | class NimbleUrlMappings { |
---|
24 | static mappings = { |
---|
25 | |
---|
26 | "/administration/adminstrators/$action?/$id?" { |
---|
27 | controller = "admins" |
---|
28 | } |
---|
29 | |
---|
30 | "/administration/users/$action?/$id?" { |
---|
31 | controller = "user" |
---|
32 | } |
---|
33 | |
---|
34 | "/administration/groups/$action?/$id?" { |
---|
35 | controller = "group" |
---|
36 | } |
---|
37 | |
---|
38 | "/administration/roles/$action?/$id?" { |
---|
39 | controller = "role" |
---|
40 | } |
---|
41 | |
---|
42 | "/register" { |
---|
43 | controller = "account" |
---|
44 | action = "createuser" |
---|
45 | } |
---|
46 | |
---|
47 | "/register/validusername" { |
---|
48 | controller = "account" |
---|
49 | action = "validusername" |
---|
50 | } |
---|
51 | |
---|
52 | "/register/save" { |
---|
53 | controller = "account" |
---|
54 | action = "saveuser" |
---|
55 | } |
---|
56 | |
---|
57 | "/registered" { |
---|
58 | controller = "account" |
---|
59 | action = "createduser" |
---|
60 | } |
---|
61 | |
---|
62 | "/validateuser/$id" { |
---|
63 | controller = "account" |
---|
64 | action = "validateuser" |
---|
65 | } |
---|
66 | |
---|
67 | "/forgottenpassword" { |
---|
68 | controller = "account" |
---|
69 | action = "forgottenpassword" |
---|
70 | } |
---|
71 | |
---|
72 | "/forgottenpassword/submit" { |
---|
73 | controller = "account" |
---|
74 | action = "forgottenpasswordprocess" |
---|
75 | } |
---|
76 | |
---|
77 | "/forgottenpassword/complete" { |
---|
78 | controller = "account" |
---|
79 | action = "forgottenpasswordcomplete" |
---|
80 | } |
---|
81 | |
---|
82 | "/forgottenpassword/external/$id?" { |
---|
83 | controller = "account" |
---|
84 | action = "forgottenpasswordexternal" |
---|
85 | } |
---|
86 | |
---|
87 | "/login" { |
---|
88 | controller = "auth" |
---|
89 | action = "login" |
---|
90 | } |
---|
91 | |
---|
92 | "/logout" { |
---|
93 | controller = "auth" |
---|
94 | action = "logout" |
---|
95 | } |
---|
96 | |
---|
97 | "/unauthorized" { |
---|
98 | controller = "auth" |
---|
99 | action = "unauthorized" |
---|
100 | } |
---|
101 | |
---|
102 | "/auth/$action" { |
---|
103 | controller = "auth" |
---|
104 | } |
---|
105 | |
---|
106 | "/profile/$action?/$id?" { |
---|
107 | controller = "profile" |
---|
108 | } |
---|
109 | } |
---|
110 | } |
---|