-
Notifications
You must be signed in to change notification settings - Fork 7
/
Copy pathtodo
45 lines (33 loc) · 804 Bytes
/
todo
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
/*==========================
| Authorities
==========================*/
// server
/* check if the user is granted to do this action
ex: POST /api/person?action=post.delete
*/
isGarunted = function(req, res, next){
if(req.user.roles.indexOf(req.action) == -1)
res.send(401);
next();
}
// client
// <a ng-click="delete(id)" ng-show="isGarunted('post.delete')" >Delete Post</a>
function(action){
return user.roles.indexOf(action) == -1
}
/*==========================
| Fields
==========================*/
var FieldSchema = new Schema({
name: String,
label: String,
isVisible: String
});
/*==========================
| nodewebkit
==========================*/
/*==========================
| ui & ux
==========================*/
- flash messages
- node-webkit border raduis