roleList.tsx 2.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374
  1. import {OrgRole, TeamRole} from 'sentry/types';
  2. export function OrgRoleList(
  3. params: OrgRole[] = [],
  4. fullAccess: boolean = false
  5. ): OrgRole[] {
  6. return [
  7. {
  8. id: 'member',
  9. name: 'Member',
  10. desc: 'Members can view and act on events, as well as view most other data within the organization.',
  11. allowed: true,
  12. isAllowed: true,
  13. is_global: false,
  14. isGlobal: false,
  15. isRetired: false,
  16. minimumTeamRole: 'contributor',
  17. },
  18. {
  19. id: 'admin',
  20. name: 'Admin',
  21. 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.",
  22. allowed: fullAccess,
  23. isAllowed: fullAccess,
  24. is_global: false,
  25. isGlobal: false,
  26. isRetired: false,
  27. minimumTeamRole: 'admin',
  28. },
  29. {
  30. id: 'manager',
  31. name: 'Manager',
  32. desc: 'Gains admin access on all teams as well as the ability to add and remove members.',
  33. allowed: fullAccess,
  34. isAllowed: fullAccess,
  35. is_global: true,
  36. isGlobal: true,
  37. isRetired: false,
  38. minimumTeamRole: 'admin',
  39. },
  40. {
  41. id: 'owner',
  42. name: 'Owner',
  43. desc: 'Gains full permission across the organization. Can manage members as well as perform catastrophic operations such as removing the organization.',
  44. allowed: fullAccess,
  45. isAllowed: fullAccess,
  46. is_global: true,
  47. isGlobal: true,
  48. isRetired: false,
  49. minimumTeamRole: 'admin',
  50. },
  51. ...params,
  52. ];
  53. }
  54. export function TeamRoleList(params: TeamRole[] = []): TeamRole[] {
  55. return [
  56. {
  57. id: 'contributor',
  58. name: 'Contributor',
  59. desc: '...',
  60. isRetired: false,
  61. isMinimumRoleFor: '',
  62. },
  63. {
  64. id: 'admin',
  65. name: 'Team Admin',
  66. desc: '...',
  67. isRetired: false,
  68. isMinimumRoleFor: '',
  69. },
  70. ...params,
  71. ];
  72. }