roleList.ts 2.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182
  1. import type {OrgRole, TeamRole} from 'sentry/types/organization';
  2. export function OrgRoleListFixture(params: OrgRole[] = []): OrgRole[] {
  3. return [
  4. {
  5. id: 'billing',
  6. name: 'Billing',
  7. desc: 'Can manage subscription and billing details.',
  8. isAllowed: false,
  9. isRetired: false,
  10. is_global: false,
  11. isGlobal: false,
  12. minimumTeamRole: 'contributor',
  13. isTeamRolesAllowed: false,
  14. },
  15. {
  16. id: 'member',
  17. name: 'Member',
  18. desc: 'Members can view and act on events, as well as view most other data within the organization.',
  19. isAllowed: false,
  20. is_global: false,
  21. isGlobal: false,
  22. isRetired: false,
  23. minimumTeamRole: 'contributor',
  24. isTeamRolesAllowed: true,
  25. },
  26. {
  27. id: 'admin',
  28. name: 'Admin',
  29. desc: "Admin privileges on any teams of which they're a member. They can create new teams and projects, as well as remove teams and projects on which they already hold membership (or all teams, if open membership is enabled). Additionally, they can manage memberships of teams that they are members of. They cannot invite members to the organization.",
  30. isAllowed: false,
  31. is_global: false,
  32. isGlobal: false,
  33. isRetired: true,
  34. minimumTeamRole: 'admin',
  35. isTeamRolesAllowed: true,
  36. },
  37. {
  38. id: 'manager',
  39. name: 'Manager',
  40. desc: 'Gains admin access on all teams as well as the ability to add and remove members.',
  41. isAllowed: false,
  42. is_global: true,
  43. isGlobal: true,
  44. isRetired: false,
  45. minimumTeamRole: 'admin',
  46. isTeamRolesAllowed: true,
  47. },
  48. {
  49. id: 'owner',
  50. name: 'Owner',
  51. desc: 'Gains full permission across the organization. Can manage members as well as perform catastrophic operations such as removing the organization.',
  52. isAllowed: false,
  53. is_global: true,
  54. isGlobal: true,
  55. isRetired: false,
  56. minimumTeamRole: 'admin',
  57. isTeamRolesAllowed: true,
  58. },
  59. ...params,
  60. ];
  61. }
  62. export function TeamRoleListFixture(params: TeamRole[] = []): TeamRole[] {
  63. return [
  64. {
  65. id: 'contributor',
  66. name: 'Contributor',
  67. desc: '...',
  68. isRetired: false,
  69. isMinimumRoleFor: '',
  70. },
  71. {
  72. id: 'admin',
  73. name: 'Team Admin',
  74. desc: '...',
  75. isRetired: false,
  76. isMinimumRoleFor: '',
  77. },
  78. ...params,
  79. ];
  80. }