navigationConfiguration.tsx 6.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211
  1. import {t} from 'sentry/locale';
  2. import {NavigationSection} from 'sentry/views/settings/types';
  3. const pathPrefix = '/settings/:orgId';
  4. const organizationNavigation: NavigationSection[] = [
  5. {
  6. name: t('Organization'),
  7. items: [
  8. {
  9. path: `${pathPrefix}/`,
  10. title: t('General Settings'),
  11. index: true,
  12. description: t('Configure general settings for an organization'),
  13. id: 'general',
  14. },
  15. {
  16. path: `${pathPrefix}/projects/`,
  17. title: t('Projects'),
  18. description: t("View and manage an organization's projects"),
  19. id: 'projects',
  20. },
  21. {
  22. path: `${pathPrefix}/teams/`,
  23. title: t('Teams'),
  24. description: t("Manage an organization's teams"),
  25. id: 'teams',
  26. },
  27. {
  28. path: `${pathPrefix}/members/`,
  29. title: t('Members'),
  30. show: ({access}) => access!.has('member:read'),
  31. description: t('Manage user membership for an organization'),
  32. id: 'members',
  33. },
  34. {
  35. path: `${pathPrefix}/security-and-privacy/`,
  36. title: t('Security & Privacy'),
  37. description: t(
  38. 'Configuration related to dealing with sensitive data and other security settings. (Data Scrubbing, Data Privacy, Data Scrubbing)'
  39. ),
  40. id: 'security-and-privacy',
  41. },
  42. {
  43. path: `${pathPrefix}/auth/`,
  44. title: t('Auth'),
  45. description: t('Configure single sign-on'),
  46. id: 'sso',
  47. },
  48. {
  49. path: `${pathPrefix}/api-keys/`,
  50. title: t('API Keys'),
  51. show: ({access, features}) =>
  52. features!.has('api-keys') && access!.has('org:admin'),
  53. id: 'api-keys',
  54. },
  55. {
  56. path: `${pathPrefix}/audit-log/`,
  57. title: t('Audit Log'),
  58. show: ({access}) => access!.has('org:write'),
  59. description: t('View the audit log for an organization'),
  60. id: 'audit-log',
  61. },
  62. {
  63. path: `${pathPrefix}/rate-limits/`,
  64. title: t('Rate Limits'),
  65. show: ({access, features}) =>
  66. features!.has('legacy-rate-limits') && access!.has('org:write'),
  67. description: t('Configure rate limits for all projects in the organization'),
  68. id: 'rate-limits',
  69. },
  70. {
  71. path: `${pathPrefix}/relay/`,
  72. title: t('Relay'),
  73. description: t('Manage relays connected to the organization'),
  74. id: 'relay',
  75. },
  76. {
  77. path: `${pathPrefix}/repos/`,
  78. title: t('Repositories'),
  79. description: t('Manage repositories connected to the organization'),
  80. id: 'repos',
  81. },
  82. {
  83. path: `${pathPrefix}/integrations/`,
  84. title: t('Integrations'),
  85. description: t(
  86. 'Manage organization-level integrations, including: Slack, Github, Bitbucket, Jira, and Azure DevOps'
  87. ),
  88. id: 'integrations',
  89. recordAnalytics: true,
  90. },
  91. {
  92. path: `${pathPrefix}/developer-settings/`,
  93. title: t('Developer Settings'),
  94. description: t('Manage developer applications'),
  95. id: 'developer-settings',
  96. },
  97. ],
  98. },
  99. ];
  100. export const organizationNavigationWithAuthTokens: NavigationSection[] = [
  101. {
  102. name: t('Organization'),
  103. items: [
  104. {
  105. path: `${pathPrefix}/`,
  106. title: t('General Settings'),
  107. index: true,
  108. description: t('Configure general settings for an organization'),
  109. id: 'general',
  110. },
  111. {
  112. path: `${pathPrefix}/projects/`,
  113. title: t('Projects'),
  114. description: t("View and manage an organization's projects"),
  115. id: 'projects',
  116. },
  117. {
  118. path: `${pathPrefix}/teams/`,
  119. title: t('Teams'),
  120. description: t("Manage an organization's teams"),
  121. id: 'teams',
  122. },
  123. {
  124. path: `${pathPrefix}/members/`,
  125. title: t('Members'),
  126. show: ({access}) => access!.has('member:read'),
  127. description: t('Manage user membership for an organization'),
  128. id: 'members',
  129. },
  130. {
  131. path: `${pathPrefix}/security-and-privacy/`,
  132. title: t('Security & Privacy'),
  133. description: t(
  134. 'Configuration related to dealing with sensitive data and other security settings. (Data Scrubbing, Data Privacy, Data Scrubbing)'
  135. ),
  136. id: 'security-and-privacy',
  137. },
  138. {
  139. path: `${pathPrefix}/auth/`,
  140. title: t('Auth'),
  141. description: t('Configure single sign-on'),
  142. id: 'sso',
  143. },
  144. {
  145. path: `${pathPrefix}/api-keys/`,
  146. title: t('API Keys'),
  147. show: ({access, features}) =>
  148. features!.has('api-keys') && access!.has('org:admin'),
  149. id: 'api-keys',
  150. },
  151. {
  152. path: `${pathPrefix}/audit-log/`,
  153. title: t('Audit Log'),
  154. show: ({access}) => access!.has('org:write'),
  155. description: t('View the audit log for an organization'),
  156. id: 'audit-log',
  157. },
  158. {
  159. path: `${pathPrefix}/rate-limits/`,
  160. title: t('Rate Limits'),
  161. show: ({access, features}) =>
  162. features!.has('legacy-rate-limits') && access!.has('org:write'),
  163. description: t('Configure rate limits for all projects in the organization'),
  164. id: 'rate-limits',
  165. },
  166. {
  167. path: `${pathPrefix}/relay/`,
  168. title: t('Relay'),
  169. description: t('Manage relays connected to the organization'),
  170. id: 'relay',
  171. },
  172. {
  173. path: `${pathPrefix}/repos/`,
  174. title: t('Repositories'),
  175. description: t('Manage repositories connected to the organization'),
  176. id: 'repos',
  177. },
  178. {
  179. path: `${pathPrefix}/integrations/`,
  180. title: t('Integrations'),
  181. description: t(
  182. 'Manage organization-level integrations, including: Slack, Github, Bitbucket, Jira, and Azure DevOps'
  183. ),
  184. id: 'integrations',
  185. recordAnalytics: true,
  186. },
  187. ],
  188. },
  189. {
  190. name: t('Developer Settings'),
  191. items: [
  192. {
  193. path: `${pathPrefix}/auth-tokens/`,
  194. title: t('Auth Tokens'),
  195. description: t('Manage organization auth tokens'),
  196. id: 'auth-tokens',
  197. },
  198. {
  199. path: `${pathPrefix}/developer-settings/`,
  200. title: t('Custom Integrations'),
  201. description: t('Manage custom integrations'),
  202. id: 'developer-settings',
  203. },
  204. ],
  205. },
  206. ];
  207. export default organizationNavigation;