roleList.js 3.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159
  1. export function OrgRoleList(params = [], fullAccess = false) {
  2. return [
  3. {
  4. id: 'member',
  5. name: 'Member',
  6. desc: 'Members can view and act on events, as well as view most other data within the organization.',
  7. scopes: [
  8. 'event:read',
  9. 'event:write',
  10. 'project:read',
  11. 'project:releases',
  12. 'org:read',
  13. 'event:admin',
  14. 'member:read',
  15. 'team:read',
  16. ],
  17. allowed: true,
  18. isAllowed: true,
  19. is_global: false,
  20. isGlobal: false,
  21. isRetired: false,
  22. minimumTeamRole: 'contributor',
  23. },
  24. {
  25. id: 'admin',
  26. name: 'Admin',
  27. 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.",
  28. scopes: [
  29. 'event:read',
  30. 'event:write',
  31. 'team:admin',
  32. 'project:read',
  33. 'project:releases',
  34. 'org:read',
  35. 'event:admin',
  36. 'member:read',
  37. 'project:write',
  38. 'team:read',
  39. 'project:admin',
  40. 'team:write',
  41. 'org:integrations',
  42. ],
  43. allowed: fullAccess,
  44. isAllowed: fullAccess,
  45. is_global: false,
  46. isGlobal: false,
  47. isRetired: false,
  48. minimumTeamRole: 'admin',
  49. },
  50. {
  51. id: 'manager',
  52. name: 'Manager',
  53. desc: 'Gains admin access on all teams as well as the ability to add and remove members.',
  54. scopes: [
  55. 'event:read',
  56. 'event:write',
  57. 'team:admin',
  58. 'member:write',
  59. 'member:admin',
  60. 'org:write',
  61. 'event:admin',
  62. 'project:write',
  63. 'project:admin',
  64. 'team:read',
  65. 'org:integrations',
  66. 'project:read',
  67. 'project:releases',
  68. 'org:read',
  69. 'member:read',
  70. 'team:write',
  71. ],
  72. allowed: fullAccess,
  73. isAllowed: fullAccess,
  74. is_global: true,
  75. isGlobal: true,
  76. isRetired: false,
  77. minimumTeamRole: 'admin',
  78. },
  79. {
  80. id: 'owner',
  81. name: 'Owner',
  82. desc: 'Gains full permission across the organization. Can manage members as well as perform catastrophic operations such as removing the organization.',
  83. scopes: [
  84. 'org:write',
  85. 'member:write',
  86. 'team:admin',
  87. 'member:admin',
  88. 'event:admin',
  89. 'project:write',
  90. 'org:admin',
  91. 'project:admin',
  92. 'event:write',
  93. 'team:read',
  94. 'project:read',
  95. 'project:releases',
  96. 'org:read',
  97. 'member:read',
  98. 'org:integrations',
  99. 'event:read',
  100. 'team:write',
  101. ],
  102. allowed: fullAccess,
  103. isAllowed: fullAccess,
  104. is_global: true,
  105. isGlobal: true,
  106. isRetired: false,
  107. minimumTeamRole: 'admin',
  108. },
  109. ...params,
  110. ];
  111. }
  112. export function TeamRoleList(params = []) {
  113. return [
  114. {
  115. id: 'contributor',
  116. name: 'Contributor',
  117. desc: '...',
  118. scopes: [
  119. 'event:read',
  120. 'event:write',
  121. 'event:admin',
  122. 'project:releases',
  123. 'project:read',
  124. 'org:read',
  125. 'member:read',
  126. 'team:read',
  127. 'alerts:read',
  128. 'alerts:write',
  129. ],
  130. isRetired: false,
  131. },
  132. {
  133. id: 'admin',
  134. name: 'Team Admin',
  135. desc: '...',
  136. scopes: [
  137. 'event:read',
  138. 'event:write',
  139. 'event:admin',
  140. 'org:read',
  141. 'member:read',
  142. 'project:read',
  143. 'project:write',
  144. 'project:admin',
  145. 'project:releases',
  146. 'team:read',
  147. 'team:write',
  148. 'team:admin',
  149. 'org:integrations',
  150. 'alerts:read',
  151. 'alerts:write',
  152. ],
  153. isRetired: false,
  154. is_minimum_role_for: 'admin',
  155. },
  156. ...params,
  157. ];
  158. }