
INSERT INTO permission_resources (name, description) VALUES
	/* 1 */
	('traveltime_submissions', 'Submissions and their time details for TravelTime forms'),
	/* 2 */
	('commcare_submissions', 'CommCare submissions'),
	/* 3 */
	('traveltime_payroll', 'TravelTime payroll information'),
	/* 4 */
	('commcare_stats', 'CommCare statistics'),
	/* 5 */
	('commcare_report', 'CommCare reports');
	/* 6 */
	('commcare_inkind_submissions', 'CommCare submissions that are inkind');

INSERT INTO permission_roles (name, description) VALUES
	/* 1 */
	('traveltime_manager', 'Users who act as TravelTime managers'),
	/* 2 */
	('traveltime_superuser', 'A TravelTime superuser'),
	/* 3 */
	('commcare_recc', 'A user who has access to a specifc RECC entries'),
	/* 4 */
	('commcare_superuser', 'A CommCare superuser'),
	/* 5 */
	('commcare_accounts', 'CommCare Accountants'),
	/* 6 */
	('commcare_apprentice_managers', 'CommCare Apprentice Managers'),
	/* 7 */
	('traveltime_payroll', 'TravelTime Payroll Users');

INSERT INTO permission_rules (name, role_id, resource_id) VALUES
	/* traveltime_manager */
	('view_managed', 1, 1),
	('edit_managed', 1, 1),
	/*traveltime_superuser */
	('view_all', 2, 1),
	('edit_all', 2, 1),
	/* commcare_recc */
	('view_managed', 3, 2),
	('edit_managed', 3, 2),
	/* commcare_superuser */
	('view_all', 4, 2),
	('edit_all', 4, 2),
	/* 
	('view_managed', 5, 3),
	('view_all', 5, 3),
	
	/* commcare_ */
	('', 0, 0),
