-
Notifications
You must be signed in to change notification settings - Fork 0
/
islandora_managed_access.install
225 lines (219 loc) · 6.76 KB
/
islandora_managed_access.install
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
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
<?php
/**
* @file
* Install hooks for this module.
*/
/**
* Implements hook_schema().
*/
function islandora_managed_access_schema() {
$schema = array();
$schema['islandora_managed_access_profile'] = array(
'description' => 'The base table for the islandora managed access profile entity',
'fields' => array(
'id' => array(
'description' => 'Primary key of the islandora managed access profile entity',
'type' => 'serial',
'unsigned' => TRUE,
'not null' => TRUE,
),
'hname' => array(
'description' => 'Human readable name of profile',
'type' => 'varchar',
'length' => '255',
'not null' => TRUE,
),
'mname' => array(
'description' => 'Machine name of profile',
'type' => 'varchar',
'length' => '255',
'not null' => TRUE,
),
'created_at' => array(
'description' => 'Date and time the profile was created',
'type' => 'int',
'not null' => TRUE,
),
'updated_at' => array(
'description' => 'Date and time the profile was last updated',
'type' => 'int',
'not null' => TRUE,
),
'rid' => array(
'description' => 'Drupal role ID associated with this profile',
'type' => 'int',
'not null' => TRUE,
),
'lifetime' => array(
'description' => 'Length in days before an associated user account expires',
'type' => 'int',
'not null' => FALSE,
),
'expiry_deletion' => array(
'description' => 'Whether or not MA user data should be automatically purged on expiration',
'type' => 'int',
'not null' => FALSE,
),
'ip_whitelist' => array(
'description' => 'List of IPs that can bypass the managed access system',
'type' => 'text',
'size' => 'big',
'not null' => FALSE,
),
'user_active_by_default' => array(
'description' => 'Whether or not this profile requires manual activation of users',
'type' => 'int',
'not null' => FALSE,
),
'review_statement' => array(
'description' => 'Blurb about how long it will take to review requests',
'type' => 'text',
'size' => 'big',
'not null' => TRUE,
),
'contact_email' => array(
'description' => 'Email address of profile point of contact',
'type' => 'text',
'not null' => FALSE,
),
'justification_info' => array(
'description' => 'Blurb explaining why objects are managed access',
'type' => 'text',
'size' => 'big',
'not null' => TRUE,
),
'usage_info' => array(
'description' => 'Blurb explaining conditions and terms of use',
'type' => 'text',
'size' => 'big',
'not null' => TRUE,
),
'contact_info' => array(
'description' => 'Blurb explainining how to get more information',
'type' => 'text',
'size' => 'big',
'not null' => TRUE,
),
'signature' => array(
'description' => 'Signature added to outgoing emails.',
'type' => 'text',
'size' => 'big',
'not null' => TRUE,
),
),
'primary key' => array('id'),
);
$schema['islandora_managed_access_object'] = array(
'description' => 'The base table for the islandora managed access object entity',
'fields' => array(
'id' => array(
'description' => 'Primary key of the islandora managed access object entity',
'type' => 'serial',
'unsigned' => TRUE,
'not null' => TRUE,
),
'pid' => array(
'description' => 'Islandora PID of the object to be managed',
'type' => 'varchar',
'length' => '255',
'not null' => TRUE,
),
'created_at' => array(
'description' => 'Date and time the object became managed',
'type' => 'int',
'not null' => TRUE,
),
'updated_at' => array(
'description' => 'Date and time the object was last updated',
'type' => 'int',
'not null' => TRUE,
),
'profile' => array(
'description' => 'Machine name of associated managed access profile',
'type' => 'int',
'not null' => TRUE,
),
'pid_whitelist' => array(
'description' => 'Whitelist of PIDs for hierarchichal objects that may bypass managed access',
'type' => 'text',
'size' => 'medium',
'not null' => FALSE,
),
),
'primary key' => array('id'),
);
$schema['islandora_managed_access_user'] = array(
'description' => 'The base table for the islandora managed access user entity',
'fields' => array(
'id' => array(
'description' => 'Primary key of the islandora managed access user entity',
'type' => 'serial',
'unsigned' => TRUE,
'not null' => TRUE,
),
'uid' => array(
'description' => 'ID of the Drupal user created with this entity',
'type' => 'int',
'length' => 10,
'not null' => TRUE,
),
'created_at' => array(
'description' => 'Date and time the user was created',
'type' => 'int',
'not null' => TRUE,
),
'updated_at' => array(
'description' => 'Date and time the user was last updated',
'type' => 'int',
'not null' => TRUE,
),
'refreshed_at' => array(
'description' => 'Date and time the user was last refreshed',
'type' => 'int',
'not null' => TRUE,
),
'warned' => array(
'description' => 'Whether or not the user has been warned of their impending expiration',
'type' => 'int',
'not null' => TRUE,
),
'active' => array(
'description' => 'Whether or not the user is active',
'type' => 'int',
'not null' => TRUE,
),
'name' => array(
'description' => 'Full name of user',
'type' => 'varchar',
'length' => '255',
'not null' => TRUE,
),
'institution' => array(
'description' => 'Institution that user is associated with',
'type' => 'varchar',
'length' => '255',
'not null' => TRUE,
),
'phone' => array(
'description' => 'Phone number of user',
'type' => 'varchar',
'length' => '255',
'not null' => TRUE,
),
'address' => array(
'description' => 'Mailing address of user',
'type' => 'varchar',
'length' => '255',
'not null' => TRUE,
),
'request_info' => array(
'description' => 'Blurb from user about why they want access to managed object',
'type' => 'text',
'size' => 'big',
'not null' => TRUE,
),
),
'primary key' => array('id'),
);
return $schema;
}