summaryrefslogtreecommitdiff
path: root/rt/docs/design_docs/groups_notes
blob: 234fd37fef543cbe1fd56db566084992bc209dd8 (plain)
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
CREATE TABLE Prinicpals (
        id int auto_increment 
        PrincipalType VARCHAR(16) not_null,
        PrincipalId int # foreign key to Users or Groups, depending
)

CREATE TABLE Groups (
        id int auto_increment,
        Domain varchar(255), 
        Instance varchar(16),
        Name varchar(255),
        Description varchar(255),
);
CREATE TABLE ACL (
  id INTEGER NOT NULL  AUTO_INCREMENT,
  Principal integer NULL  , #Foreign key to principals
  RightName varchar(25) NULL  ,
  RightDomain varchar(25) NULL  ,
  RightInstance integer NULL  ,
  PRIMARY KEY (id)
);      

CREATE TABLE GroupMembers (
        id int auto_increment,
        Group int, # foreign key to Principals
        Member int # foreign key to Principals
)

create table GroupMembersCache (
        id int auto_increment,
        Group int, # foreign key to Principals
        Member int, # foreign key to Principals
        Via int, #foreign key to g_m_u
)

insert into principals values ('bubbles);
insert into principals values ('fubar');
insert into principals values ('sheeri');
insert into principals values ('sgw');

insert into principals values ('staff');
insert into principals values ('sysadmin');
insert into principals values ('senior admin');


insert into group_members values(1, 'staff', 'bubbles');
insert into group_members values(2, 'sysadmin', 'sheeri');
insert into group_members values(3,'senior admin', 'sgw');
insert into group_members values(4,'senior admin', 'fubar');
insert into group_members values(5, 'sysadmin', 'senior admin')
        
Groups


      
Domain          Queues
Instance        <queueid#>
Name            AdminCc, Cc

/Queues/1/AdminCc
/Queues/3/Cc

Domain          Tickets
Instance        <#n>
Name            Owner, Requestor, Cc, AdminCc

/Tickets/1/Owner
/Tickets/1/Requestor
/Tickets/1/Cc
       Has members: /Queues/whatever queue the ticket has/Cc 
/Tickets/1/AdminCc
       Has members: /Queues/whatever queue the ticket has/AdminCc 


Domain          Users
Instance        <userid>

/Users/1/MyDelegates
/Users/1/MyOtherDelegates


Domain          System
Name            Admins, AdminManagers

/System/Administrators
/System/Blah