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
|
/*
UserPermissions.h
There relations from one user with:
Services
Groups
Permissions:
Creator C
Owner O
Admin A
Write W
Read R
Execute E
-----------------------
Tabla 1:
groups
user
lopezj www,postman,admin,ajedrez
manolo users,qfisica,pdi
-----------------------
Tabla 2:
objeto
grupo/user xxx-xxx-aaa
/dir/doc.txt
ajedrez
/dir/doc.txt C
O
A
-----------------------
Permissions: C=Creator,O=Owner,A=Admin,R=Read,W=Write,X=eXecute,r=Rename,M=Move,H=cHange permissions
Type C O A R W X E M H
1 ...... 1 1 1 1 1 1 1 1 1 .........
0 ...... 0 0 0 0 0 0 0 0 0 .........
bits 1 16 17 18 19 20 21 22 23 24 25 64
--------------------------------------------------------
Total: 64 bits, 8 bytes
Types:
0: main
1: cclient
2: nntp
3: poppass
4: databases
5: finger
6: personaldata
7: filebrowser
8: forwardmail
9: secvirtual
10: useraccounts
11: config
12: sieve
*/
#ifndef __USERPERMISSIONS_H
#define __USERPERMISSIONS_H
#include <stdarg.h>
#include <stdio.h>
#include <string.h>
#include <stdlib.h>
#include <stdio.h>
#include <ctype.h>
#include <signal.h>
#include "Language.h"
#include "Utils.h"
#include "Config.h"
#include "XSocket.h"
#include "XVector.h"
/*
class UserPermissions
{
private:
TBuffer ErrorString;
StringList aSLServices, SLGroups;
public:
UserPermissions (const char *user);
virtual ~UserPermissions ();
const char *getErrorMsg (void);
bool refresh (void);
//Services
void getFullServices (StringList *aSLFullServices);
void getServices (StringList *aSLServices);
bool isAllowedService (const char *aservice);
//Groups for user
void getFullGroups (StringList *aSLFullGroups);
void getGroups (StringList *aSLGroups);
bool isGroup (const char *agroup);
void getPermissionsInGroup (const char *agroup, char *apermissions);
bool isPermissionSet (const char *agroup, char apermission);
};
*/
#endif
|