roles.rb 625 B

123456789101112131415161718192021222324252627282930313233
  1. Role.create_if_not_exists(
  2. id: 1,
  3. name: 'Admin',
  4. note: 'To configure your system.',
  5. preferences: {
  6. not: ['Customer'],
  7. },
  8. default_at_signup: false,
  9. updated_by_id: 1,
  10. created_by_id: 1
  11. )
  12. Role.create_if_not_exists(
  13. id: 2,
  14. name: 'Agent',
  15. note: 'To work on Tickets.',
  16. default_at_signup: false,
  17. preferences: {
  18. not: ['Customer'],
  19. },
  20. updated_by_id: 1,
  21. created_by_id: 1
  22. )
  23. Role.create_if_not_exists(
  24. id: 3,
  25. name: 'Customer',
  26. note: 'People who create Tickets ask for help.',
  27. preferences: {
  28. not: %w[Agent Admin],
  29. },
  30. default_at_signup: true,
  31. updated_by_id: 1,
  32. created_by_id: 1
  33. )