Repository navigation
Expand file tree
/
Copy pathinitialdata.pl
More file actions
64 lines (58 loc) · 1.67 KB
/
Copy pathinitialdata.pl
File metadata and controls
64 lines (58 loc) · 1.67 KB
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
# Example of RT initial data, see https://docs.bestpractical.com/rt/latest/initialdata.html
#
# Mount it into the init directory to apply it on the first start:
#
# docker run -v ./examples:/docker-entrypoint-init.d:ro ...
#
# or insert it into a running container:
#
# docker exec -i rt rt-initdata - < examples/initialdata.pl
@Users = (
{
Name => 'alice',
Password => 'alice-password',
EmailAddress => 'alice@example.com',
RealName => 'Alice Example',
Privileged => 1,
},
{
Name => 'customer',
Password => 'customer-password',
EmailAddress => 'customer@example.com',
Privileged => 0,
},
);
@Groups = (
{
Name => 'Staff',
Description => 'Support staff',
Members => { Users => ['alice'] },
},
);
@Queues = (
{
Name => 'Support',
Description => 'Support requests',
CorrespondAddress => 'support@example.com',
CommentAddress => 'support-comment@example.com',
},
);
# REST2 can create custom fields, but not apply them to a queue
@CustomFields = (
{
Name => 'Severity',
Type => 'SelectSingle',
LookupType => 'RT::Queue-RT::Ticket',
Queue => ['General', 'Support'],
Values => [
{ Name => 'Low', SortOrder => 1 },
{ Name => 'High', SortOrder => 2 },
],
},
);
@ACL = (
map {
{ GroupId => 'Staff', GroupDomain => 'UserDefined', Queue => 'Support', Right => $_ }
} qw(SeeQueue ShowTicket CreateTicket ReplyToTicket CommentOnTicket OwnTicket ModifyTicket),
);
1;