commiting uncommited changes on live site
[weblabels.fsf.org.git] / crm.fsf.org / 20131203 / files / sites / all / modules-new / civicrm / sql / civicrm_sample.mysql
1 -- +--------------------------------------------------------------------+
2 -- | CiviCRM version 4.6 |
3 -- +--------------------------------------------------------------------+
4 -- | Copyright CiviCRM LLC (c) 2004-2015 |
5 -- +--------------------------------------------------------------------+
6 -- | This file is a part of CiviCRM. |
7 -- | |
8 -- | CiviCRM is free software; you can copy, modify, and distribute it |
9 -- | under the terms of the GNU Affero General Public License |
10 -- | Version 3, 19 November 2007 and the CiviCRM Licensing Exception. |
11 -- | |
12 -- | CiviCRM is distributed in the hope that it will be useful, but |
13 -- | WITHOUT ANY WARRANTY; without even the implied warranty of |
14 -- | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. |
15 -- | See the GNU Affero General Public License for more details. |
16 -- | |
17 -- | You should have received a copy of the GNU Affero General Public |
18 -- | License and the CiviCRM Licensing Exception along |
19 -- | with this program; if not, contact CiviCRM LLC |
20 -- | at info[AT]civicrm[DOT]org. If you have questions about the |
21 -- | GNU Affero General Public License or the licensing of CiviCRM, |
22 -- | see the CiviCRM license FAQ at https://civicrm.org/licensing |
23 -- +--------------------------------------------------------------------+
24 --
25 -- Generated from civicrm_sample.tpl
26 -- DO NOT EDIT. Generated by CRM_Core_CodeGen
27 --
28
29 SELECT @domainID := id FROM civicrm_domain where name = 'Default Domain Name';
30
31 -- Sample Extended Property Group and Fields
32
33 INSERT INTO `civicrm_price_set` (`name`,`title`,`is_active`,`extends`,`is_quick_config`)
34 VALUES ('help_support_civicrm_amount', 'Help Support CiviCRM!', 1, 2, 1);
35
36 SELECT @priceSetId := max(id) FROM `civicrm_price_set` WHERE `is_quick_config` = 1 and name = 'help_support_civicrm_amount';
37
38 INSERT INTO `civicrm_price_field` (`price_set_id`, `name`, `label`, `html_type`, `is_enter_qty`, `weight`, `is_display_amounts`, `options_per_line`, `is_active`, `is_required`, `visibility_id`)
39 VALUES ( @priceSetId, 'contribution_amount', 'Contribution Amount', 'Radio', 0, 2, 1, 1, 1, 0, 1),
40 ( @priceSetId, 'other_amount', 'Other Amount', 'Text', 0, 3, 0, 1, 1, 0, 1);
41
42 INSERT INTO `civicrm_price_set_entity` (`entity_table`,`entity_id`,`price_set_id`)
43 VALUES ('civicrm_contribution_page', 1, @priceSetId);
44
45 SELECT @priceFieldID := max(id) FROM `civicrm_price_field` WHERE `price_set_id` = @priceSetId AND name = 'contribution_amount';
46
47 INSERT INTO
48 `civicrm_price_field_value` (`price_field_id`,`name`,`label`, `amount`, `weight`, `is_active`, `is_default`, `financial_type_id`)
49 VALUES
50 (@priceFieldID,'friend','Friend','1.00',1,1,0,1),
51 (@priceFieldID,'supporter', 'Supporter','5.00',2,1,0,1),
52 (@priceFieldID,'booster','Booster','10.00',3,1,1,1),
53 (@priceFieldID,'sustainer','Sustainer','50.00',4,1,0,1);
54
55 SELECT @priceFieldID := max(id) FROM `civicrm_price_field` WHERE `price_set_id` = @priceSetId AND name = 'other_amount';
56
57 INSERT INTO
58 `civicrm_price_field_value` (`price_field_id`,`name`,`label`, `amount`, `weight`, `is_active`, `is_default`, `financial_type_id`)
59 VALUES
60 (@priceFieldID, 'other_amount', 'Other Amount', 1, 3, 1, 0, 1);
61
62 INSERT INTO civicrm_contribution_page
63 (title,intro_text,financial_type_id,is_monetary,is_allow_other_amount,default_amount_id,min_amount,max_amount,goal_amount,thankyou_title,thankyou_text,thankyou_footer,receipt_from_name,receipt_from_email,cc_receipt,bcc_receipt,receipt_text,is_active,footer_text,amount_block_is_active,currency,is_email_receipt)
64 VALUES
65 ('Help Support CiviCRM!','Do you love CiviCRM? Do you use CiviCRM? Then please support CiviCRM and Contribute NOW by trying out our new online contribution features!',1,1,1,137,'10.00','10000.00','100000.00','Thanks for Your Support!','<p>Thank you for your support. Your contribution will help us build even better tools.</p><p>Please tell your friends and colleagues about CiviCRM!</p>','<p><a href=https://civicrm.org>Back to CiviCRM Home Page</a></p>','CiviCRM Fundraising Dept.','donationFake@civicrm.org','receipt@example.com','bcc@example.com','Your donation is tax deductible under IRS 501(c)(3) regulation. Our tax identification number is: 93-123-4567',1, NULL, 1, 'USD', 1),
66 ('Member Signup and Renewal', 'Members are the life-blood of our organization. If you''re not already a member - please consider signing up today. You can select the membership level the fits your budget and needs below.', 2, 1, NULL, NULL, NULL, NULL, NULL, 'Thanks for Your Support!', 'Thanks for supporting our organization with your membership. You can learn more about membership benefits from our members only page.', NULL, 'Membership Department', 'memberships@civicrm.org', NULL, NULL, 'Thanks for supporting our organization with your membership. You can learn more about membership benefits from our members only page.\r\n\r\nKeep this receipt for your records.', 1, NULL, 0, 'USD', 1),
67 ('Pledge for CiviCRM!','Do you love CiviCRM? Do you use CiviCRM? Then please support CiviCRM and Pledge NOW by trying out our online contribution features!',1,1,1,NULL,'10.00','10000.00','100000.00','Thanks for Your Support!','<p>Thank you for your support. Your contribution will help us build even better tools like Pledge.</p><p>Please tell your friends and colleagues about CiviPledge!</p>','<p><a href=https://civicrm.org>Back to CiviCRM Home Page</a></p>','CiviCRM Fundraising Dept.','donationFake@civicrm.org','receipt@example.com','bcc@example.com','Your donation is tax deductible under IRS 501(c)(3) regulation. Our tax identification number is: 93-123-4567',1, NULL, 1, 'USD', 1);
68
69 INSERT INTO `civicrm_tell_friend`
70 (`entity_table`, `entity_id`, `title`, `intro`, `suggested_message`, `general_link`, `thankyou_title`, `thankyou_text`, `is_active`)
71 VALUES
72 ('civicrm_contribution_page', 1, 'Tell A Friend', '<p>Help us spread the word and leverage the power of your contribution by telling your friends. Use the space below to personalize your email message - let your friends know why you support us. Then fill in the name(s) and email address(es) and click ''Send Your Message''.</p>', 'Thought you might be interested in learning about and helping this organization. I think they do important work.', NULL, 'Thanks for Spreading the Word', '<p><strong>Thanks for telling your friends about us and supporting our efforts. Together we can make a difference.</strong></p>', 1),
73 ('civicrm_event', 1, 'Tell A Friend', '<p>Help us spread the word about this event. Use the space below to personalize your email message - let your friends know why you''re attending. Then fill in the name(s) and email address(es) and click ''Send Your Message''.</p>', 'Thought you might be interested in checking out this event. I''m planning on attending.', NULL, 'Thanks for Spreading the Word', '<p>Thanks for spreading the word about this event to your friends.</p>', 1);
74
75 INSERT INTO `civicrm_pcp_block`
76 (`id`, `entity_table`, `entity_id`, `supporter_profile_id`, `owner_notify_id`, `is_approval_needed`, `is_tellfriend_enabled`, `tellfriend_limit`, `link_text`, `is_active`, `target_entity_id` )
77 VALUES
78 (1, 'civicrm_contribution_page', 1, 2, 1, 1, 1, 5, 'Create your own Personal Campaign Page!', 1, 1);
79
80 INSERT INTO civicrm_membership_type
81 (domain_id, name, description, member_of_contact_id, financial_type_id, minimum_fee, duration_unit, duration_interval, period_type, fixed_period_start_day, fixed_period_rollover_day, relationship_type_id, relationship_direction, visibility, weight, is_active)
82 VALUES
83 (@domainID, 'General', 'Regular annual membership.', 1, 2, 100.00, 'year', 2, 'rolling', NULL, NULL, 7, 'b_a', 'Public', 1, 1),
84 (@domainID, 'Student', 'Discount membership for full-time students.', 1, 2, 50.00, 'year', 1, 'rolling', NULL, NULL, NULL, NULL, 'Public', 2, 1),
85 (@domainID, 'Lifetime', 'Lifetime membership.', 1, 2, 1200.00, 'lifetime', 1, 'rolling', NULL, NULL, 7, 'b_a', 'Admin', 3, 1);
86
87 INSERT INTO civicrm_membership_block
88 (entity_table, entity_id, membership_types, membership_type_default, display_min_fee, is_separate_payment, new_title, new_text, renewal_title, renewal_text, is_required, is_active)
89 VALUES
90 ('civicrm_contribution_page', 2, 'a:2:{i:1;i:0;i:2;i:0;}', 1, 1, 0, 'Membership Levels', 'Please select the appropriate membership level below. You will have a chance to review your selection and the corresponding dues on the next page prior to your credit card being charged.', 'Renew or Upgrade Your Membership', 'Information on your current membership level and expiration date is shown below. You may renew or upgrade at any time - but don''t let your membership lapse!', 1, 1);
91
92 INSERT INTO civicrm_pledge_block ( entity_table, entity_id, pledge_frequency_unit, is_pledge_interval, max_reminders, initial_reminder_day, additional_reminder_day)
93 VALUES
94 ('civicrm_contribution_page', 3, 'week\ 1month\ 1year', 1, 1, 5, 5),
95 ('civicrm_contribution_page', 1, 'week\ 1month\ 1year', 0, 2, 5, 5);
96
97 INSERT INTO civicrm_premiums
98 VALUES (1, 'civicrm_contribution_page', 1, 1, 'Thank-you Gifts', 'We appreciate your support and invite you to choose from the exciting collection of thank-you gifts below. Minimum contribution amounts for each selection are included in the descriptions. (NOTE: These gifts are shown as examples only. No gifts will be sent to donors.)', 'premiums@example.org', NULL, 1, 'No thank-you', 1);
99
100 INSERT INTO civicrm_product VALUES (1, 'Coffee Mug', 'This heavy-duty mug is great for home or office, coffee or tea or hot chocolate. Show your support to family, friends and colleagues. Choose from three great colors.', 'MUG-101', 'White, Black, Green', NULL, NULL, 12.50, 'USD', NULL, 5.00, NULL, 1, NULL, NULL, NULL, NULL, NULL, NULL);
101 INSERT INTO civicrm_premiums_product VALUES (1, 1, 1, 1, NULL);
102
103
104 -- Add sample activity type
105
106 SELECT @option_group_id_act := max(id) from civicrm_option_group where name = 'activity_type';
107 SELECT @option_value_max_val := max(ROUND(civicrm_option_value.value)) from civicrm_option_value where option_group_id = @option_group_id_act;
108
109 INSERT INTO
110 `civicrm_option_value` (`option_group_id`, `label`, `value`, `name`, `grouping`, `filter`, `is_default`, `weight`, `description`, `is_optgroup`, `is_reserved`, `is_active`)
111 VALUES
112 (@option_group_id_act, 'Interview', (SELECT @option_value_max_val := @option_value_max_val + 1), 'Interview', NULL, 0, NULL, @option_value_max_val, 'Conduct a phone or in person interview.', 0, 0, 1);
113
114 INSERT INTO `civicrm_contact_type`
115 ( `name`, `label`,`image_URL`, `parent_id`, `is_active`,`is_reserved`)
116 VALUES
117 ( 'Student' , 'Student' , NULL, 1, 1, 0),
118 ( 'Parent' , 'Parent' , NULL, 1, 1, 0),
119 ( 'Staff' , 'Staff' , NULL, 1, 1, 0),
120 ( 'Team' , 'Team' , NULL, 3, 1, 0),
121 ( 'Sponsor' , 'Sponsor' , NULL, 3, 1, 0);
122
123 SELECT @domain_id := min(id) FROM civicrm_domain;
124 SELECT @nav_indi := id FROM civicrm_navigation WHERE name = 'New Individual';
125 SELECT @nav_org := id FROM civicrm_navigation WHERE name = 'New Organization';
126 INSERT INTO `civicrm_navigation`
127 ( domain_id, url, label, name,permission, permission_operator, parent_id, is_active, has_separator, weight )
128 VALUES
129 ( @domain_id, 'civicrm/contact/add?ct=Individual&cst=Student&reset=1' , 'New Student', 'New Student', 'add contacts', '', @nav_indi, '1', NULL, 1 ),
130 ( @domain_id, 'civicrm/contact/add?ct=Individual&cst=Parent&reset=1' , 'New Parent' , 'New Parent' , 'add contacts', '', @nav_indi, '1', NULL, 2 ),
131 ( @domain_id, 'civicrm/contact/add?ct=Individual&cst=Staff&reset=1' , 'New Staff' , 'New Staff' , 'add contacts', '', @nav_indi, '1', NULL, 3 ),
132 ( @domain_id, 'civicrm/contact/add?ct=Organization&cst=Team&reset=1' , 'New Team' , 'New Team' , 'add contacts', '', @nav_org , '1', NULL, 1 ),
133 ( @domain_id, 'civicrm/contact/add?ct=Organization&cst=Sponsor&reset=1', 'New Sponsor', 'New Sponsor', 'add contacts', '', @nav_org , '1', NULL, 2 );
134
135 -- Add sample dashlets
136
137 INSERT INTO `civicrm_dashboard`
138 ( `domain_id`, `name`, `label`, `url`, `permission`, `permission_operator`, `column_no`, `is_minimized`, `is_active`, `weight`, `is_fullscreen`, `fullscreen_url`)
139 VALUES
140 ( @domain_id, 'report/6', 'Donor Summary' , 'civicrm/report/instance/6?reset=1&section=1&snippet=5&charts=barChart', 'access CiviContribute', 'AND', 0, 0,'1', 4, '1', 'civicrm/report/instance/6?reset=1&section=1&snippet=5&charts=barChart&context=dashletFullscreen'),
141 ( @domain_id, 'report/13', 'Top Donors' , 'civicrm/report/instance/13?reset=1&section=2&snippet=5', 'access CiviContribute', 'AND', 0, 0,'1', 5, '1', 'civicrm/report/instance/13?reset=1&section=2&snippet=5&context=dashletFullscreen'),
142 ( @domain_id, 'report/26', 'Event Income Summary', 'civicrm/report/instance/26?reset=1&section=1&snippet=5&charts=pieChart', 'access CiviEvent' , 'AND', 0, 0,'1', 6, '1', 'civicrm/report/instance/26?reset=1&section=1&snippet=5&charts=pieChart&context=dashletFullscreen'),
143 ( @domain_id, 'report/21', 'Membership Summary' , 'civicrm/report/instance/21?reset=1&section=2&snippet=5', 'access CiviMember' , 'AND', 0, 0,'1', 7, '1', 'civicrm/report/instance/21?reset=1&section=2&snippet=5&context=dashletFullscreen');
144
145 -- INSERT sample data for membership
146
147 SELECT @financial_type_id := max(id) FROM `civicrm_financial_type` WHERE `name` = 'Member Dues';
148
149 SELECT @priceSetID := max(id) FROM `civicrm_price_set` WHERE `name` LIKE 'default_membership_type_amount' AND `is_quick_config` = 1;
150 INSERT INTO `civicrm_price_field` ( `price_set_id`, `name`, `label`, `html_type` )
151 VALUES ( @priceSetID, '1', 'Membership Amount', 'Radio' );
152
153 SELECT @priceFieldId := max(id) FROM `civicrm_price_field` WHERE `name` LIKE '1';
154
155 INSERT civicrm_price_field_value ( price_field_id, name, label, description, amount, weight, membership_type_id, financial_type_id )
156 SELECT @priceFieldId, LOWER(name), name, description, minimum_fee, id as weight, id, @financial_type_id FROM `civicrm_membership_type`;
157
158
159 INSERT INTO `civicrm_price_set` (`name`,`title`,`is_active`,`extends`, `financial_type_id`, `is_quick_config`)
160 VALUES ('member_signup_and_renewal', 'Member Signup and Renewal', 1, 3, @financial_type_id, 1),
161 ('pledge_for_civicrm', 'Pledge for CiviCRM!',1,2,null,1);
162
163 SELECT @priceSetId := max(id) FROM `civicrm_price_set` WHERE `is_quick_config` = 1 and name = 'member_signup_and_renewal';
164
165 INSERT INTO `civicrm_price_field` (`price_set_id`, `name`, `label`, `html_type`, `is_enter_qty`, `weight`, `is_display_amounts`, `options_per_line`, `is_active`, `is_required`, `visibility_id`) VALUES ( @priceSetId, 'membership_amount', 'Membership', 'Radio', 0, 1, 1, 1, 1, 1, 1);
166
167 INSERT INTO `civicrm_price_set_entity` (`entity_table`,`entity_id`,`price_set_id`) VALUES ('civicrm_contribution_page', 2, @priceSetId);
168
169 SELECT @priceFieldID := max(id) FROM `civicrm_price_field` WHERE `price_set_id` = @priceSetId AND name = 'membership_amount';
170
171 SELECT @membershipIdG := max(id) FROM `civicrm_membership_type` WHERE name= 'General';
172
173 SELECT @membershipIdS := max(id) FROM `civicrm_membership_type` WHERE name= 'Student';
174
175 INSERT INTO
176 `civicrm_price_field_value` (`price_field_id`,`name`,`label`, `amount`, `weight`, `membership_type_id`, `is_active`, `is_default`, `financial_type_id`)
177 VALUES
178 (@priceFieldID,'General','General','100.00', 1, @membershipIdG, 1, 1, @financial_type_id),
179 (@priceFieldID,'Student','Student','50.00', 1, @membershipIdS , 1, 0, @financial_type_id);
180
181 SELECT @priceSetId := max(id) FROM `civicrm_price_set` WHERE `is_quick_config` = 1 AND `name` = 'pledge_for_civicrm';
182
183 INSERT INTO `civicrm_price_field` (`price_set_id`, `name`, `label`, `html_type`, `is_enter_qty`, `weight`, `is_display_amounts`, `options_per_line`, `is_active`, `is_required`, `visibility_id`)
184 VALUES ( @priceSetId, 'other_amount', 'Contribution Amount', 'Text', 0, 3, 0, 1, 1, 1, 1);
185
186 INSERT INTO `civicrm_price_set_entity` (`entity_table`,`entity_id`,`price_set_id`)
187 VALUES ('civicrm_contribution_page', 3, @priceSetId);
188
189 SELECT @priceFieldID := max(id) FROM `civicrm_price_field` WHERE `price_set_id` = @priceSetId AND name = 'other_amount';
190
191 INSERT INTO
192 `civicrm_price_field_value` (`price_field_id`,`name`,`label`, `amount`, `weight`, `is_active`, `is_default`, `financial_type_id`)
193 VALUES
194 (@priceFieldID,'other_amount','Contribution Amount','1',1,1,0,1);
195
196
197 -- Insert sample data for event
198
199 INSERT INTO `civicrm_price_set` (`name`,`title`,`is_active`,`extends`, `is_quick_config`)
200 VALUES ('rain_forest_cup_youth_soccer_tournament', 'Rain-forest Cup Youth Soccer Tournament', 1, 1, 1),
201 ('fall_fundraiser_dinner', 'Fall Fundraiser Dinner', 1, 1, 1),
202 ('summer_solstice_festival_day_concert', 'Summer Solstice Festival Day Concert',1,1,1);
203
204 SELECT @priceSetId := max(id) FROM `civicrm_price_set` WHERE `is_quick_config` = 1 AND `name` = 'rain_forest_cup_youth_soccer_tournament';
205
206 INSERT INTO `civicrm_price_field` (`price_set_id`, `name`, `label`, `html_type`, `is_enter_qty`, `weight`, `is_display_amounts`, `options_per_line`, `is_active`, `is_required`, `visibility_id`)
207 VALUES ( @priceSetId, 'tournament_fees', 'Tournament Fees', 'Radio', 0, 1, 1, 1, 1, 1, 1);
208
209 INSERT INTO `civicrm_price_set_entity` (`entity_table`,`entity_id`,`price_set_id`)
210 VALUES ('civicrm_event', 3, @priceSetId);
211
212 SELECT @priceFieldID := max(id) FROM `civicrm_price_field` WHERE `price_set_id` = @priceSetId AND name = 'tournament_fees';
213
214 INSERT INTO
215 `civicrm_price_field_value` (`price_field_id`,`name`,`label`, `amount`, `weight`, `is_active`, `is_default`, `financial_type_id`)
216 VALUES
217 (@priceFieldID,'tiny_tots__ages_5_8_','Tiny-tots (ages 5-8)','800',1,1,1,4),
218 (@priceFieldID,'junior_Stars__ages_9_12_','Junior Stars (ages 9-12)','1000',2,1,0,4),
219 (@priceFieldID,'super_Stars__ages_13_18_','Super Stars (ages 13-18)','1500',3,1,0,4);
220
221 SELECT @priceSetId := max(id) FROM `civicrm_price_set` WHERE `is_quick_config` = 1 AND `name` = 'fall_fundraiser_dinner';
222
223 INSERT INTO `civicrm_price_field` (`price_set_id`, `name`, `label`, `html_type`, `is_enter_qty`, `weight`, `is_display_amounts`, `options_per_line`, `is_active`, `is_required`, `visibility_id`)
224 VALUES ( @priceSetId, 'dinner_contribution', 'Dinner Contribution', 'Radio', 0, 1, 1, 1, 1, 1, 1);
225
226 INSERT INTO `civicrm_price_set_entity` (`entity_table`,`entity_id`,`price_set_id`)
227 VALUES ('civicrm_event', 1, @priceSetId);
228
229 SELECT @priceFieldID := max(id) FROM `civicrm_price_field` WHERE `price_set_id` = @priceSetId AND name = 'dinner_contribution';
230
231 INSERT INTO
232 `civicrm_price_field_value` (`price_field_id`,`name`,`label`, `amount`, `weight`, `is_active`, `is_default`, `financial_type_id`)
233 VALUES
234 (@priceFieldID,'single','Single','50',1,1,1,4),
235 (@priceFieldID,'couple','Couple','100',2,1,0,4),
236 (@priceFieldID,'family','Family','200',3,1,0,4);
237
238 SELECT @priceSetId := max(id) FROM `civicrm_price_set` WHERE `is_quick_config` = 1 AND `name` = 'summer_solstice_festival_day_concert';
239
240 INSERT INTO `civicrm_price_field` (`price_set_id`, `name`, `label`, `html_type`, `is_enter_qty`, `weight`, `is_display_amounts`, `options_per_line`, `is_active`, `is_required`, `visibility_id`)
241 VALUES ( @priceSetId, 'festival_fee', 'Festival Fee', 'Radio', 0, 1, 1, 1, 1, 1, 1);
242
243 INSERT INTO `civicrm_price_set_entity` (`entity_table`,`entity_id`,`price_set_id`)
244 VALUES ('civicrm_event', 2, @priceSetId);
245
246 SELECT @priceFieldID := max(id) FROM `civicrm_price_field` WHERE `price_set_id` = @priceSetId AND name = 'festival_fee';
247
248 INSERT INTO
249 `civicrm_price_field_value` (`price_field_id`,`name`,`label`, `amount`, `weight`, `is_active`, `is_default`, `financial_type_id`)
250 VALUES
251 (@priceFieldID,'bass','Bass','25',1,1,1,2),
252 (@priceFieldID,'tenor','Tenor','40',2,1,0,2),
253 (@priceFieldID,'soprano','Soprano','50',3,1,0,2);
254
255 -- +--------------------------------------------------------------------+
256 -- | CiviCRM version 4.6 |
257 -- +--------------------------------------------------------------------+
258 -- | Copyright CiviCRM LLC (c) 2004-2015 |
259 -- +--------------------------------------------------------------------+
260 -- | This file is a part of CiviCRM. |
261 -- | |
262 -- | CiviCRM is free software; you can copy, modify, and distribute it |
263 -- | under the terms of the GNU Affero General Public License |
264 -- | Version 3, 19 November 2007 and the CiviCRM Licensing Exception. |
265 -- | |
266 -- | CiviCRM is distributed in the hope that it will be useful, but |
267 -- | WITHOUT ANY WARRANTY; without even the implied warranty of |
268 -- | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. |
269 -- | See the GNU Affero General Public License for more details. |
270 -- | |
271 -- | You should have received a copy of the GNU Affero General Public |
272 -- | License and the CiviCRM Licensing Exception along |
273 -- | with this program; if not, contact CiviCRM LLC |
274 -- | at info[AT]civicrm[DOT]org. If you have questions about the |
275 -- | GNU Affero General Public License or the licensing of CiviCRM, |
276 -- | see the CiviCRM license FAQ at http://civicrm.org/licensing |
277 -- +--------------------------------------------------------------------+
278 --
279 -- Generated from civicrm_acl.tpl
280 -- DO NOT EDIT. Generated by CRM_Core_CodeGen
281 --
282 -- sample acl entries
283
284 -- Create ACL to edit and view contacts in all groups
285 INSERT INTO civicrm_acl (name, deny, entity_table, entity_id, operation, object_table, object_id, acl_table, acl_id, is_active)
286 VALUES
287 ('Edit All Contacts', 0, 'civicrm_acl_role', 1, 'Edit', 'civicrm_saved_search', 0, NULL, NULL, 1),
288 ('Core ACL', 0, 'civicrm_acl_role', 0, 'All', 'access CiviMail subscribe/unsubscribe pages', NULL, NULL, NULL, 1),
289 ('Core ACL', 0, 'civicrm_acl_role', 0, 'All', 'access all custom data', NULL, NULL, NULL, 1),
290 ('Core ACL', 0, 'civicrm_acl_role', 0, 'All', 'make online contributions', NULL, NULL, NULL, 1),
291 ('Core ACL', 0, 'civicrm_acl_role', 0, 'All', 'make online pledges', NULL, NULL, NULL, 1),
292 ('Core ACL', 0, 'civicrm_acl_role', 0, 'All', 'profile listings and forms', NULL, NULL, NULL, 1),
293 ('Core ACL', 0, 'civicrm_acl_role', 0, 'All', 'view event info', NULL, NULL, NULL, 1),
294 ('Core ACL', 0, 'civicrm_acl_role', 0, 'All', 'register for events', NULL, NULL, NULL, 1),
295 ('Core ACL', 0, 'civicrm_acl_role', 1, 'All', 'access CiviCRM', NULL, NULL, NULL, 1),
296 ('Core ACL', 0, 'civicrm_acl_role', 1, 'All', 'access CiviContribute', NULL, NULL, NULL, 1),
297 ('Core ACL', 0, 'civicrm_acl_role', 1, 'All', 'access CiviEvent', NULL, NULL, NULL, 1),
298 ('Core ACL', 0, 'civicrm_acl_role', 1, 'All', 'access CiviMail', NULL, NULL, NULL, 1),
299 ('Core ACL', 0, 'civicrm_acl_role', 1, 'All', 'access CiviMail subscribe/unsubscribe pages', NULL, NULL, NULL, 1),
300 ('Core ACL', 0, 'civicrm_acl_role', 1, 'All', 'access CiviMember', NULL, NULL, NULL, 1),
301 ('Core ACL', 0, 'civicrm_acl_role', 1, 'All', 'access CiviPledge', NULL, NULL, NULL, 1),
302 ('Core ACL', 0, 'civicrm_acl_role', 1, 'All', 'administer CiviCase', NULL, NULL, NULL, 1),
303 ('Core ACL', 0, 'civicrm_acl_role', 1, 'All', 'access my cases and activities', NULL, NULL, NULL, 1),
304 ('Core ACL', 0, 'civicrm_acl_role', 1, 'All', 'access all cases and activities', NULL, NULL, NULL, 1),
305 ('Core ACL', 0, 'civicrm_acl_role', 1, 'All', 'delete in CiviCase', NULL, NULL, NULL, 1),
306 ('Core ACL', 0, 'civicrm_acl_role', 1, 'All', 'access CiviGrant', NULL, NULL, NULL, 1),
307 ('Core ACL', 0, 'civicrm_acl_role', 1, 'All', 'access Contact Dashboard', NULL, NULL, NULL, 1),
308 ('Core ACL', 0, 'civicrm_acl_role', 1, 'All', 'administer Multiple Organizations', NULL, NULL, NULL, 1),
309 ('Core ACL', 0, 'civicrm_acl_role', 1, 'All', 'delete activities', NULL, NULL, NULL, 1),
310 ('Core ACL', 0, 'civicrm_acl_role', 1, 'All', 'delete in CiviContribute', NULL, NULL, NULL, 1),
311 ('Core ACL', 0, 'civicrm_acl_role', 1, 'All', 'delete in CiviMail', NULL, NULL, NULL, 1),
312 ('Core ACL', 0, 'civicrm_acl_role', 1, 'All', 'delete in CiviPledge', NULL, NULL, NULL, 1),
313 ('Core ACL', 0, 'civicrm_acl_role', 1, 'All', 'delete contacts', NULL, NULL, NULL, 1),
314 ('Core ACL', 0, 'civicrm_acl_role', 1, 'All', 'delete in CiviEvent', NULL, NULL, NULL, 1),
315 ('Core ACL', 0, 'civicrm_acl_role', 1, 'All', 'delete in CiviMember', NULL, NULL, NULL, 1),
316 ('Core ACL', 0, 'civicrm_acl_role', 1, 'All', 'translate CiviCRM', NULL, NULL, NULL, 1),
317 ('Core ACL', 0, 'civicrm_acl_role', 1, 'All', 'edit grants', NULL, NULL, NULL, 1),
318 ('Core ACL', 0, 'civicrm_acl_role', 1, 'All', 'access all custom data', NULL, NULL, NULL, 1),
319 ('Core ACL', 0, 'civicrm_acl_role', 1, 'All', 'access uploaded files', NULL, NULL, NULL, 1),
320 ('Core ACL', 0, 'civicrm_acl_role', 1, 'All', 'add contacts', NULL, NULL, NULL, 1),
321 ('Core ACL', 0, 'civicrm_acl_role', 1, 'All', 'administer CiviCRM', NULL, NULL, NULL, 1),
322 ('Core ACL', 0, 'civicrm_acl_role', 1, 'All', 'edit all contacts', NULL, NULL, NULL, 1),
323 ('Core ACL', 0, 'civicrm_acl_role', 1, 'All', 'edit contributions', NULL, NULL, NULL, 1),
324 ('Core ACL', 0, 'civicrm_acl_role', 1, 'All', 'edit event participants', NULL, NULL, NULL, 1),
325 ('Core ACL', 0, 'civicrm_acl_role', 1, 'All', 'edit groups', NULL, NULL, NULL, 1),
326 ('Core ACL', 0, 'civicrm_acl_role', 1, 'All', 'edit memberships', NULL, NULL, NULL, 1),
327 ('Core ACL', 0, 'civicrm_acl_role', 1, 'All', 'edit pledges', NULL, NULL, NULL, 1),
328 ('Core ACL', 0, 'civicrm_acl_role', 1, 'All', 'access CiviReport', NULL, NULL, NULL, 1),
329 ('Core ACL', 0, 'civicrm_acl_role', 1, 'All', 'access Report Criteria', NULL, NULL, NULL, 1),
330 ('Core ACL', 0, 'civicrm_acl_role', 1, 'All', 'administer Reports', NULL, NULL, NULL, 1),
331 ('Core ACL', 0, 'civicrm_acl_role', 1, 'All', 'import contacts', NULL, NULL, NULL, 1),
332 ('Core ACL', 0, 'civicrm_acl_role', 1, 'All', 'make online contributions', NULL, NULL, NULL, 1),
333 ('Core ACL', 0, 'civicrm_acl_role', 1, 'All', 'make online pledges', NULL, NULL, NULL, 1),
334 ('Core ACL', 0, 'civicrm_acl_role', 1, 'All', 'profile listings and forms', NULL, NULL, NULL, 1),
335 ('Core ACL', 0, 'civicrm_acl_role', 1, 'All', 'profile create', NULL, NULL, NULL, 1),
336 ('Core ACL', 0, 'civicrm_acl_role', 1, 'All', 'profile edit', NULL, NULL, NULL, 1),
337 ('Core ACL', 0, 'civicrm_acl_role', 1, 'All', 'profile listings', NULL, NULL, NULL, 1),
338 ('Core ACL', 0, 'civicrm_acl_role', 1, 'All', 'profile view', NULL, NULL, NULL, 1),
339 ('Core ACL', 0, 'civicrm_acl_role', 1, 'All', 'register for events', NULL, NULL, NULL, 1),
340 ('Core ACL', 0, 'civicrm_acl_role', 1, 'All', 'view all activities', NULL, NULL, NULL, 1),
341 ('Core ACL', 0, 'civicrm_acl_role', 1, 'All', 'view all contacts', NULL, NULL, NULL, 1),
342 ('Core ACL', 0, 'civicrm_acl_role', 1, 'All', 'view event info', NULL, NULL, NULL, 1),
343 ('Core ACL', 0, 'civicrm_acl_role', 1, 'All', 'view event participants', NULL, NULL, NULL, 1),
344 ('Core ACL', 0, 'civicrm_acl_role', 1, 'All', 'edit all events', NULL, NULL, NULL, 1),
345 ('Core ACL', 0, 'civicrm_acl_role', 2, 'All', 'access CiviMail subscribe/unsubscribe pages', NULL, NULL, NULL, 1),
346 ('Core ACL', 0, 'civicrm_acl_role', 2, 'All', 'access all custom data', NULL, NULL, NULL, 1),
347 ('Core ACL', 0, 'civicrm_acl_role', 2, 'All', 'make online contributions', NULL, NULL, NULL, 1),
348 ('Core ACL', 0, 'civicrm_acl_role', 2, 'All', 'make online pledges', NULL, NULL, NULL, 1),
349 ('Core ACL', 0, 'civicrm_acl_role', 2, 'All', 'profile listings and forms', NULL, NULL, NULL, 1),
350 ('Core ACL', 0, 'civicrm_acl_role', 2, 'All', 'register for events', NULL, NULL, NULL, 1),
351 ('Core ACL', 0, 'civicrm_acl_role', 2, 'All', 'view event info', NULL, NULL, NULL, 1);
352
353 -- Create default Groups for User Permissioning
354 INSERT INTO civicrm_group (`id`, `name`, `title`, `description`, `source`, `saved_search_id`, `is_active`, `visibility`, `group_type`) VALUES (1, 'Administrators', 'Administrators', 'Contacts in this group are assigned Administrator role permissions.', NULL, NULL, 1, 'User and User Admin Only', '\ 11\ 1');
355
356 -- Assign above Group (entity) to the Administrator Role
357 INSERT INTO civicrm_acl_entity_role
358 (`acl_role_id`, `entity_table`, `entity_id`, `is_active`)
359 VALUES
360 (1, 'civicrm_group', 1, 1);
361