roleList.js 2.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495
  1. export function RoleList(params = [], fullAccess = false) {
  2. return [
  3. {
  4. scopes: [
  5. 'event:read',
  6. 'event:write',
  7. 'project:read',
  8. 'project:releases',
  9. 'org:read',
  10. 'event:admin',
  11. 'member:read',
  12. 'team:read',
  13. ],
  14. is_global: false,
  15. name: 'Member',
  16. allowed: true,
  17. id: 'member',
  18. desc: 'Members can view and act on events, as well as view most other data within the organization.',
  19. },
  20. {
  21. scopes: [
  22. 'event:read',
  23. 'event:write',
  24. 'team:admin',
  25. 'project:read',
  26. 'project:releases',
  27. 'org:read',
  28. 'event:admin',
  29. 'member:read',
  30. 'project:write',
  31. 'team:read',
  32. 'project:admin',
  33. 'team:write',
  34. 'org:integrations',
  35. ],
  36. is_global: false,
  37. name: 'Admin',
  38. allowed: fullAccess,
  39. id: 'admin',
  40. 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.",
  41. },
  42. {
  43. scopes: [
  44. 'event:read',
  45. 'event:write',
  46. 'team:admin',
  47. 'member:write',
  48. 'member:admin',
  49. 'org:write',
  50. 'event:admin',
  51. 'project:write',
  52. 'project:admin',
  53. 'team:read',
  54. 'org:integrations',
  55. 'project:read',
  56. 'project:releases',
  57. 'org:read',
  58. 'member:read',
  59. 'team:write',
  60. ],
  61. is_global: true,
  62. name: 'Manager',
  63. allowed: fullAccess,
  64. id: 'manager',
  65. desc: 'Gains admin access on all teams as well as the ability to add and remove members.',
  66. },
  67. {
  68. scopes: [
  69. 'org:write',
  70. 'member:write',
  71. 'team:admin',
  72. 'member:admin',
  73. 'event:admin',
  74. 'project:write',
  75. 'org:admin',
  76. 'project:admin',
  77. 'event:write',
  78. 'team:read',
  79. 'project:read',
  80. 'project:releases',
  81. 'org:read',
  82. 'member:read',
  83. 'org:integrations',
  84. 'event:read',
  85. 'team:write',
  86. ],
  87. is_global: true,
  88. name: 'Owner',
  89. allowed: fullAccess,
  90. id: 'owner',
  91. desc: 'Gains full permission across the organization. Can manage members as well as perform catastrophic operations such as removing the organization.',
  92. },
  93. ...params,
  94. ];
  95. }