taskrambler
v0.1.8
Web server and task management solution.
Main Page
Related Pages
Data Structures
Files
File List
Globals
permission.h
Go to the documentation of this file.
1
/**
2
* \file
3
*
4
* \author Georg Hopp
5
*
6
* \copyright
7
* Copyright © 2012 Georg Hopp
8
*
9
* This program is free software: you can redistribute it and/or modify
10
* it under the terms of the GNU General Public License as published by
11
* the Free Software Foundation, either version 3 of the License, or
12
* (at your option) any later version.
13
*
14
* This program is distributed in the hope that it will be useful,
15
* but WITHOUT ANY WARRANTY; without even the implied warranty of
16
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17
* GNU General Public License for more details.
18
*
19
* You should have received a copy of the GNU General Public License
20
* along with this program. If not, see <http://www.gnu.org/licenses/>.
21
*/
22
23
#ifndef __PERMISSION_H__
24
#define __PERMISSION_H__
25
26
#include <sys/types.h>
27
28
#include "
class.h
"
29
#include "
storage/storage.h
"
30
31
/**
32
* These might be hardcoded within the application.
33
* In fact, as we are creating a restful CRUD application we might
34
* consider not having these at all but define that each resource
35
* might potentially have either Create, Read, Update and Delete
36
* actions.
37
*
38
* Suggestion Actions as Bitmask...
39
*/
40
typedef
enum
e_ResourceActions {
41
CREATE
= 1,
42
READ
= 2,
43
UPDATE
= 4,
44
DELETE
= 8
45
}
ResourceAction
;
46
47
48
CLASS
(Permission) {
49
char
id
[37];
50
unsigned
long
hash;
51
52
char
* resource;
53
ResourceAction
action;
54
};
55
56
#endif // __PERMISSION_H__
57
58
// vim: set ts=4 sw=4:
59
class.h
READ
Definition:
permission.h:42
storage.h
UPDATE
Definition:
permission.h:43
CLASS
CLASS(Permission)
Definition:
permission.h:48
ResourceAction
ResourceAction
Definition:
permission.h:40
CREATE
Definition:
permission.h:41
DELETE
Definition:
permission.h:44
include
permission.h
Generated on Wed Apr 13 2016 12:25:16 for taskrambler by
1.8.10