@punch-in/strapi-admin 3.6.8

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (673) hide show
  1. package/LICENSE +22 -0
  2. package/README.md +23 -0
  3. package/admin/src/app.js +242 -0
  4. package/admin/src/assets/icons/icon_auth-permissions.svg +1 -0
  5. package/admin/src/assets/icons/icon_content-manager.svg +1 -0
  6. package/admin/src/assets/icons/icon_content-type-builder.svg +1 -0
  7. package/admin/src/assets/icons/icon_settings-manager.svg +1 -0
  8. package/admin/src/assets/icons/icon_success.svg +19 -0
  9. package/admin/src/assets/images/background_empty.svg +1 -0
  10. package/admin/src/assets/images/background_welcome_homepage.png +0 -0
  11. package/admin/src/assets/images/banner_strapi-rocket.png +0 -0
  12. package/admin/src/assets/images/banner_t-shirt.png +0 -0
  13. package/admin/src/assets/images/bg_hp_tee_shirt.png +0 -0
  14. package/admin/src/assets/images/logo-strapi.png +0 -0
  15. package/admin/src/assets/images/logo-t-shirt.svg +1 -0
  16. package/admin/src/assets/images/logo_github.png +0 -0
  17. package/admin/src/assets/images/logo_slack.png +0 -0
  18. package/admin/src/assets/images/logo_stack_overflow.png +0 -0
  19. package/admin/src/assets/images/logo_strapi.png +0 -0
  20. package/admin/src/assets/images/oops.png +0 -0
  21. package/admin/src/assets/images/social_discord.png +0 -0
  22. package/admin/src/assets/images/social_gh.png +0 -0
  23. package/admin/src/assets/images/social_reddit.png +0 -0
  24. package/admin/src/assets/images/social_strapi.png +0 -0
  25. package/admin/src/assets/images/social_twitter.png +0 -0
  26. package/admin/src/components/BaselineAlignement/index.js +33 -0
  27. package/admin/src/components/Bloc/index.js +9 -0
  28. package/admin/src/components/ContainerFluid/index.js +13 -0
  29. package/admin/src/components/Fonts/index.js +76 -0
  30. package/admin/src/components/FormBloc/index.js +60 -0
  31. package/admin/src/components/FullWidthButton/index.js +15 -0
  32. package/admin/src/components/GlobalStyle/index.js +175 -0
  33. package/admin/src/components/Header/index.js +40 -0
  34. package/admin/src/components/HeaderSearch/HeaderSearch.js +8 -0
  35. package/admin/src/components/HeaderSearch/index.js +99 -0
  36. package/admin/src/components/IntlInput/index.js +38 -0
  37. package/admin/src/components/LeftMenu/LeftMenuFooter/Wrapper.js +51 -0
  38. package/admin/src/components/LeftMenu/LeftMenuFooter/index.js +44 -0
  39. package/admin/src/components/LeftMenu/LeftMenuHeader/Wrapper.js +51 -0
  40. package/admin/src/components/LeftMenu/LeftMenuHeader/index.js +14 -0
  41. package/admin/src/components/LeftMenu/LeftMenuLink/A.js +39 -0
  42. package/admin/src/components/LeftMenu/LeftMenuLink/LeftMenuIcon.js +23 -0
  43. package/admin/src/components/LeftMenu/LeftMenuLink/LeftMenuLinkContent.js +97 -0
  44. package/admin/src/components/LeftMenu/LeftMenuLink/NotificationCount.js +32 -0
  45. package/admin/src/components/LeftMenu/LeftMenuLink/index.js +41 -0
  46. package/admin/src/components/LeftMenu/LeftMenuLinkHeader/Search.js +11 -0
  47. package/admin/src/components/LeftMenu/LeftMenuLinkHeader/SearchButton.js +11 -0
  48. package/admin/src/components/LeftMenu/LeftMenuLinkHeader/SearchWrapper.js +11 -0
  49. package/admin/src/components/LeftMenu/LeftMenuLinkHeader/Title.js +30 -0
  50. package/admin/src/components/LeftMenu/LeftMenuLinkHeader/index.js +81 -0
  51. package/admin/src/components/LeftMenu/LeftMenuLinkHeader/messages.json +38 -0
  52. package/admin/src/components/LeftMenu/LeftMenuLinkSection/EmptyLinksList.js +21 -0
  53. package/admin/src/components/LeftMenu/LeftMenuLinkSection/EmptyLinksListWrapper.js +9 -0
  54. package/admin/src/components/LeftMenu/LeftMenuLinkSection/LeftMenuListLink.js +10 -0
  55. package/admin/src/components/LeftMenu/LeftMenuLinkSection/index.js +84 -0
  56. package/admin/src/components/LeftMenu/LinksContainer/index.js +31 -0
  57. package/admin/src/components/LeftMenu/index.js +4 -0
  58. package/admin/src/components/NavTopRightWrapper/index.js +11 -0
  59. package/admin/src/components/Notifications/Notification/Li.js +168 -0
  60. package/admin/src/components/Notifications/Notification/index.js +104 -0
  61. package/admin/src/components/Notifications/NotificationsContainer/Wrapper.js +17 -0
  62. package/admin/src/components/Notifications/NotificationsContainer/index.js +56 -0
  63. package/admin/src/components/Notifications/index.js +2 -0
  64. package/admin/src/components/PageTitle/index.js +15 -0
  65. package/admin/src/components/Roles/ButtonWithNumber/NumberCard.js +10 -0
  66. package/admin/src/components/Roles/ButtonWithNumber/index.js +42 -0
  67. package/admin/src/components/Roles/CheckboxWithCondition/index.js +41 -0
  68. package/admin/src/components/Roles/Chevron/index.js +11 -0
  69. package/admin/src/components/Roles/CollapseLabel/index.js +11 -0
  70. package/admin/src/components/Roles/ConditionsButton/Wrapper.js +28 -0
  71. package/admin/src/components/Roles/ConditionsButton/index.js +49 -0
  72. package/admin/src/components/Roles/ConditionsModal/ActionRow/Wrapper.js +12 -0
  73. package/admin/src/components/Roles/ConditionsModal/ActionRow/index.js +88 -0
  74. package/admin/src/components/Roles/ConditionsModal/ConditionsSelect/ClearIndicator.js +15 -0
  75. package/admin/src/components/Roles/ConditionsModal/ConditionsSelect/CustomDropdownIndicator.js +39 -0
  76. package/admin/src/components/Roles/ConditionsModal/ConditionsSelect/IndicatorSeparator.js +3 -0
  77. package/admin/src/components/Roles/ConditionsModal/ConditionsSelect/MenuList/SubUl.js +48 -0
  78. package/admin/src/components/Roles/ConditionsModal/ConditionsSelect/MenuList/Ul.js +80 -0
  79. package/admin/src/components/Roles/ConditionsModal/ConditionsSelect/MenuList/UpperFirst.js +6 -0
  80. package/admin/src/components/Roles/ConditionsModal/ConditionsSelect/MenuList/index.js +140 -0
  81. package/admin/src/components/Roles/ConditionsModal/ConditionsSelect/MenuList/utils/constants.js +3 -0
  82. package/admin/src/components/Roles/ConditionsModal/ConditionsSelect/MenuList/utils/createCollapsesObject.js +14 -0
  83. package/admin/src/components/Roles/ConditionsModal/ConditionsSelect/SingleValue.js +46 -0
  84. package/admin/src/components/Roles/ConditionsModal/ConditionsSelect/index.js +67 -0
  85. package/admin/src/components/Roles/ConditionsModal/Separator.js +9 -0
  86. package/admin/src/components/Roles/ConditionsModal/index.js +150 -0
  87. package/admin/src/components/Roles/ConditionsModal/utils/createDefaultConditionsForm.js +47 -0
  88. package/admin/src/components/Roles/ConditionsModal/utils/selectStyle.js +95 -0
  89. package/admin/src/components/Roles/ContentTypeCollapse/Collapse/Wrapper.js +38 -0
  90. package/admin/src/components/Roles/ContentTypeCollapse/Collapse/index.js +156 -0
  91. package/admin/src/components/Roles/ContentTypeCollapse/Collapse/utils/constants.js +3 -0
  92. package/admin/src/components/Roles/ContentTypeCollapse/Collapse/utils/generateCheckboxesActions.js +55 -0
  93. package/admin/src/components/Roles/ContentTypeCollapse/CollapsePropertyMatrix/ActionRow/Wrapper.js +28 -0
  94. package/admin/src/components/Roles/ContentTypeCollapse/CollapsePropertyMatrix/ActionRow/index.js +162 -0
  95. package/admin/src/components/Roles/ContentTypeCollapse/CollapsePropertyMatrix/ActionRow/utils/constants.js +3 -0
  96. package/admin/src/components/Roles/ContentTypeCollapse/CollapsePropertyMatrix/ActionRow/utils/getRowLabelCheckboxeState.js +59 -0
  97. package/admin/src/components/Roles/ContentTypeCollapse/CollapsePropertyMatrix/Header/index.js +65 -0
  98. package/admin/src/components/Roles/ContentTypeCollapse/CollapsePropertyMatrix/SubActionRow/Wrapper.js +8 -0
  99. package/admin/src/components/Roles/ContentTypeCollapse/CollapsePropertyMatrix/SubActionRow/index.js +176 -0
  100. package/admin/src/components/Roles/ContentTypeCollapse/CollapsePropertyMatrix/SubActionRow/row.js +37 -0
  101. package/admin/src/components/Roles/ContentTypeCollapse/CollapsePropertyMatrix/SubActionRow/timeline.js +15 -0
  102. package/admin/src/components/Roles/ContentTypeCollapse/CollapsePropertyMatrix/SubActionRow/utils/constants.js +3 -0
  103. package/admin/src/components/Roles/ContentTypeCollapse/CollapsePropertyMatrix/Wrapper.js +21 -0
  104. package/admin/src/components/Roles/ContentTypeCollapse/CollapsePropertyMatrix/index.js +55 -0
  105. package/admin/src/components/Roles/ContentTypeCollapse/CollapsePropertyMatrix/utils/generateHeadersFromActions.js +12 -0
  106. package/admin/src/components/Roles/ContentTypeCollapse/Wrapper.js +17 -0
  107. package/admin/src/components/Roles/ContentTypeCollapse/index.js +72 -0
  108. package/admin/src/components/Roles/ContentTypeCollapse/utils/activeStyle.js +15 -0
  109. package/admin/src/components/Roles/ContentTypeCollapse/utils/getAvailableActions.js +10 -0
  110. package/admin/src/components/Roles/ContentTypeCollapse/utils/index.js +2 -0
  111. package/admin/src/components/Roles/ContentTypeCollapses/index.js +50 -0
  112. package/admin/src/components/Roles/ContentTypes/Wrapper.js +13 -0
  113. package/admin/src/components/Roles/ContentTypes/index.js +39 -0
  114. package/admin/src/components/Roles/Curve/index.js +35 -0
  115. package/admin/src/components/Roles/EmptyRole/index.js +31 -0
  116. package/admin/src/components/Roles/GlobalActions/Wrapper.js +18 -0
  117. package/admin/src/components/Roles/GlobalActions/index.js +66 -0
  118. package/admin/src/components/Roles/GlobalActions/utils/constants.js +3 -0
  119. package/admin/src/components/Roles/GlobalActions/utils/findDisplayedActions.js +4 -0
  120. package/admin/src/components/Roles/GlobalActions/utils/getRowLabelCheckboxesState.js +38 -0
  121. package/admin/src/components/Roles/GlobalActions/utils/index.js +2 -0
  122. package/admin/src/components/Roles/HiddenAction/index.js +9 -0
  123. package/admin/src/components/Roles/Permissions/README.md +372 -0
  124. package/admin/src/components/Roles/Permissions/index.js +155 -0
  125. package/admin/src/components/Roles/Permissions/init.js +41 -0
  126. package/admin/src/components/Roles/Permissions/reducer.js +177 -0
  127. package/admin/src/components/Roles/Permissions/utils/createDefaultCTFormFromLayout.js +178 -0
  128. package/admin/src/components/Roles/Permissions/utils/createDefaultPluginsFormFromLayout.js +49 -0
  129. package/admin/src/components/Roles/Permissions/utils/findMatchingPermissions.js +4 -0
  130. package/admin/src/components/Roles/Permissions/utils/formatContentTypesPermissionToAPI.js +122 -0
  131. package/admin/src/components/Roles/Permissions/utils/formatLayoutForSettingsAndPlugins.js +23 -0
  132. package/admin/src/components/Roles/Permissions/utils/formatPermissionsToAPI.js +21 -0
  133. package/admin/src/components/Roles/Permissions/utils/formatSettingsPermissionsToAPI.js +59 -0
  134. package/admin/src/components/Roles/Permissions/utils/tabLabels.js +24 -0
  135. package/admin/src/components/Roles/Permissions/utils/updateConditionsToFalse.js +39 -0
  136. package/admin/src/components/Roles/Permissions/utils/updateValues.js +31 -0
  137. package/admin/src/components/Roles/PermissionsDataManagerProvider/index.js +26 -0
  138. package/admin/src/components/Roles/PluginsAndSettings/ListWrapper.js +10 -0
  139. package/admin/src/components/Roles/PluginsAndSettings/Row/Wrapper.js +28 -0
  140. package/admin/src/components/Roles/PluginsAndSettings/Row/index.js +82 -0
  141. package/admin/src/components/Roles/PluginsAndSettings/SubCategory/CheckboxWrapper.js +22 -0
  142. package/admin/src/components/Roles/PluginsAndSettings/SubCategory/ConditionsButtonWrapper.js +13 -0
  143. package/admin/src/components/Roles/PluginsAndSettings/SubCategory/Wrapper.js +26 -0
  144. package/admin/src/components/Roles/PluginsAndSettings/SubCategory/index.js +136 -0
  145. package/admin/src/components/Roles/PluginsAndSettings/SubCategory/utils/constants.js +3 -0
  146. package/admin/src/components/Roles/PluginsAndSettings/SubCategory/utils/formatActions.js +32 -0
  147. package/admin/src/components/Roles/PluginsAndSettings/SubCategory/utils/getConditionsButtonState.js +17 -0
  148. package/admin/src/components/Roles/PluginsAndSettings/SubCategory/utils/index.js +2 -0
  149. package/admin/src/components/Roles/PluginsAndSettings/index.js +53 -0
  150. package/admin/src/components/Roles/RequiredSign/index.js +11 -0
  151. package/admin/src/components/Roles/RoleForm/NameInput.js +6 -0
  152. package/admin/src/components/Roles/RoleForm/RoleForm.js +94 -0
  153. package/admin/src/components/Roles/RoleForm/index.js +2 -0
  154. package/admin/src/components/Roles/RoleList/RoleDescription.js +9 -0
  155. package/admin/src/components/Roles/RoleList/RoleListWrapper.js +17 -0
  156. package/admin/src/components/Roles/RoleList/RoleRow.js +48 -0
  157. package/admin/src/components/Roles/RoleList/index.js +3 -0
  158. package/admin/src/components/Roles/RowLabelWithCheckbox/Wrapper.js +29 -0
  159. package/admin/src/components/Roles/RowLabelWithCheckbox/index.js +76 -0
  160. package/admin/src/components/Roles/Tabs/Tab.js +22 -0
  161. package/admin/src/components/Roles/Tabs/TabsWrapper.js +17 -0
  162. package/admin/src/components/Roles/Tabs/index.js +65 -0
  163. package/admin/src/components/Roles/index.js +6 -0
  164. package/admin/src/components/Roles/utils/createArrayOfValues.js +19 -0
  165. package/admin/src/components/Roles/utils/getCheckboxState.js +19 -0
  166. package/admin/src/components/Roles/utils/index.js +3 -0
  167. package/admin/src/components/Roles/utils/removeConditionKeyFromData.js +15 -0
  168. package/admin/src/components/Settings/Header/index.js +71 -0
  169. package/admin/src/components/Settings/index.js +2 -0
  170. package/admin/src/components/SettingsPageTitle/index.js +17 -0
  171. package/admin/src/components/SizedInput/index.js +25 -0
  172. package/admin/src/components/UpgradePlanModal/components/Arrow/arrow.png +0 -0
  173. package/admin/src/components/UpgradePlanModal/components/Arrow/index.js +16 -0
  174. package/admin/src/components/UpgradePlanModal/components/Download/index.js +13 -0
  175. package/admin/src/components/UpgradePlanModal/components/Option/Wrapper.js +12 -0
  176. package/admin/src/components/UpgradePlanModal/components/Option/index.js +18 -0
  177. package/admin/src/components/UpgradePlanModal/components/Wrapper/balloon.png +0 -0
  178. package/admin/src/components/UpgradePlanModal/components/Wrapper/index.js +14 -0
  179. package/admin/src/components/UpgradePlanModal/components/index.js +4 -0
  180. package/admin/src/components/UpgradePlanModal/index.js +76 -0
  181. package/admin/src/components/Users/Filter/index.js +41 -0
  182. package/admin/src/components/Users/FilterPicker/Button.js +14 -0
  183. package/admin/src/components/Users/FilterPicker/Card/Input.js +35 -0
  184. package/admin/src/components/Users/FilterPicker/Card/Wrapper.js +8 -0
  185. package/admin/src/components/Users/FilterPicker/Card/index.js +91 -0
  186. package/admin/src/components/Users/FilterPicker/Card/init.js +5 -0
  187. package/admin/src/components/Users/FilterPicker/Card/reducer.js +39 -0
  188. package/admin/src/components/Users/FilterPicker/Card/utils/form.js +57 -0
  189. package/admin/src/components/Users/FilterPicker/Card/utils/formatInputValue.js +9 -0
  190. package/admin/src/components/Users/FilterPicker/Card/utils/getInputValue.js +9 -0
  191. package/admin/src/components/Users/FilterPicker/Card/utils/index.js +3 -0
  192. package/admin/src/components/Users/FilterPicker/index.js +35 -0
  193. package/admin/src/components/Users/Footer/Wrapper.js +7 -0
  194. package/admin/src/components/Users/Footer/index.js +40 -0
  195. package/admin/src/components/Users/LinkNotification/Envelope.js +20 -0
  196. package/admin/src/components/Users/LinkNotification/IconWrapper.js +15 -0
  197. package/admin/src/components/Users/LinkNotification/Wrapper.js +26 -0
  198. package/admin/src/components/Users/LinkNotification/index.js +47 -0
  199. package/admin/src/components/Users/List/ActiveStatus.js +20 -0
  200. package/admin/src/components/Users/List/Wrapper.js +34 -0
  201. package/admin/src/components/Users/List/index.js +151 -0
  202. package/admin/src/components/Users/List/init.js +5 -0
  203. package/admin/src/components/Users/List/reducer.js +56 -0
  204. package/admin/src/components/Users/List/utils/checkIfAllEntriesAreSelected.js +3 -0
  205. package/admin/src/components/Users/List/utils/getSelectedIds.js +19 -0
  206. package/admin/src/components/Users/List/utils/headers.js +42 -0
  207. package/admin/src/components/Users/List/utils/index.js +4 -0
  208. package/admin/src/components/Users/List/utils/updateRows.js +6 -0
  209. package/admin/src/components/Users/MagicLink/index.js +27 -0
  210. package/admin/src/components/Users/ModalCreateBody/Wrapper.js +12 -0
  211. package/admin/src/components/Users/ModalCreateBody/index.js +153 -0
  212. package/admin/src/components/Users/ModalCreateBody/init.js +5 -0
  213. package/admin/src/components/Users/ModalCreateBody/reducer.js +27 -0
  214. package/admin/src/components/Users/ModalCreateBody/utils/form.js +29 -0
  215. package/admin/src/components/Users/ModalCreateBody/utils/formDataModel.js +8 -0
  216. package/admin/src/components/Users/ModalCreateBody/utils/roleSettingsForm.js +10 -0
  217. package/admin/src/components/Users/ModalCreateBody/utils/schema.js +17 -0
  218. package/admin/src/components/Users/RoleSettingsModalSection/RolesSelectComponent.js +53 -0
  219. package/admin/src/components/Users/RoleSettingsModalSection/index.js +76 -0
  220. package/admin/src/components/Users/SelectRoles/ClearIndicator.js +15 -0
  221. package/admin/src/components/Users/SelectRoles/DropdownIndicator.js +39 -0
  222. package/admin/src/components/Users/SelectRoles/ErrorMessage.js +10 -0
  223. package/admin/src/components/Users/SelectRoles/IndicatorSeparator.js +3 -0
  224. package/admin/src/components/Users/SelectRoles/MultiValueContainer.js +43 -0
  225. package/admin/src/components/Users/SelectRoles/StyledOption.js +11 -0
  226. package/admin/src/components/Users/SelectRoles/index.js +68 -0
  227. package/admin/src/components/Users/SelectRoles/utils/styles.js +99 -0
  228. package/admin/src/components/Users/SortPicker/Button.js +14 -0
  229. package/admin/src/components/Users/SortPicker/List.js +46 -0
  230. package/admin/src/components/Users/SortPicker/ListItem.js +37 -0
  231. package/admin/src/components/Users/SortPicker/ListWrapper.js +18 -0
  232. package/admin/src/components/Users/SortPicker/StyledListItem.js +30 -0
  233. package/admin/src/components/Users/SortPicker/index.js +34 -0
  234. package/admin/src/components/Users/index.js +8 -0
  235. package/admin/src/components/Webhooks/EventInput/EventRow.js +66 -0
  236. package/admin/src/components/Webhooks/EventInput/Wrapper.js +77 -0
  237. package/admin/src/components/Webhooks/EventInput/index.js +128 -0
  238. package/admin/src/components/Webhooks/EventInput/utils/formatValue.js +13 -0
  239. package/admin/src/components/Webhooks/HeadersInput/Wrapper.js +102 -0
  240. package/admin/src/components/Webhooks/HeadersInput/index.js +143 -0
  241. package/admin/src/components/Webhooks/HeadersInput/keys.js +39 -0
  242. package/admin/src/components/Webhooks/HeadersInput/utils/getBorderColor.js +12 -0
  243. package/admin/src/components/Webhooks/Inputs/Wrapper.js +34 -0
  244. package/admin/src/components/Webhooks/Inputs/index.js +110 -0
  245. package/admin/src/components/Webhooks/ListRow/StyledListRow.js +49 -0
  246. package/admin/src/components/Webhooks/ListRow/index.js +113 -0
  247. package/admin/src/components/Webhooks/Switch/Toggle.js +30 -0
  248. package/admin/src/components/Webhooks/Switch/Wrapper.js +67 -0
  249. package/admin/src/components/Webhooks/Switch/index.js +51 -0
  250. package/admin/src/components/Webhooks/TriggerContainer/Wrapper.js +64 -0
  251. package/admin/src/components/Webhooks/TriggerContainer/index.js +103 -0
  252. package/admin/src/components/Webhooks/index.js +4 -0
  253. package/admin/src/config.js +13 -0
  254. package/admin/src/configureStore.js +60 -0
  255. package/admin/src/containers/Admin/Content.js +30 -0
  256. package/admin/src/containers/Admin/Logout/components.js +128 -0
  257. package/admin/src/containers/Admin/Logout/index.js +60 -0
  258. package/admin/src/containers/Admin/Wrapper.js +27 -0
  259. package/admin/src/containers/Admin/actions.js +21 -0
  260. package/admin/src/containers/Admin/constants.js +9 -0
  261. package/admin/src/containers/Admin/index.js +364 -0
  262. package/admin/src/containers/Admin/reducer.js +39 -0
  263. package/admin/src/containers/Admin/selectors.js +22 -0
  264. package/admin/src/containers/App/actions.js +87 -0
  265. package/admin/src/containers/App/components.js +15 -0
  266. package/admin/src/containers/App/constants.js +18 -0
  267. package/admin/src/containers/App/index.js +158 -0
  268. package/admin/src/containers/App/reducer.js +86 -0
  269. package/admin/src/containers/App/selectors.js +38 -0
  270. package/admin/src/containers/App/styles/website.css +25 -0
  271. package/admin/src/containers/App/utils/customRoutes.js +3 -0
  272. package/admin/src/containers/App/utils/defaultRoutes.js +3 -0
  273. package/admin/src/containers/App/utils/index.js +3 -0
  274. package/admin/src/containers/App/utils/routes.js +4 -0
  275. package/admin/src/containers/App/utils/unique-identifier.js +10 -0
  276. package/admin/src/containers/ApplicationInfosPage/components/Detail/index.js +30 -0
  277. package/admin/src/containers/ApplicationInfosPage/components/InfoText/index.js +19 -0
  278. package/admin/src/containers/ApplicationInfosPage/components/Link/components.js +22 -0
  279. package/admin/src/containers/ApplicationInfosPage/components/Link/index.js +26 -0
  280. package/admin/src/containers/ApplicationInfosPage/components/Wrapper/index.js +7 -0
  281. package/admin/src/containers/ApplicationInfosPage/components/index.js +4 -0
  282. package/admin/src/containers/ApplicationInfosPage/index.js +89 -0
  283. package/admin/src/containers/AuthPage/components/AuthLink/Link.js +13 -0
  284. package/admin/src/containers/AuthPage/components/AuthLink/Wrapper.js +8 -0
  285. package/admin/src/containers/AuthPage/components/AuthLink/index.js +35 -0
  286. package/admin/src/containers/AuthPage/components/Box/Wrapper.js +13 -0
  287. package/admin/src/containers/AuthPage/components/Box/index.js +28 -0
  288. package/admin/src/containers/AuthPage/components/ForgotPassword/index.js +65 -0
  289. package/admin/src/containers/AuthPage/components/ForgotPasswordSuccess/Envelope.js +20 -0
  290. package/admin/src/containers/AuthPage/components/ForgotPasswordSuccess/index.js +77 -0
  291. package/admin/src/containers/AuthPage/components/Input/index.js +32 -0
  292. package/admin/src/containers/AuthPage/components/Login/BaseLogin.js +84 -0
  293. package/admin/src/containers/AuthPage/components/Login/index.js +23 -0
  294. package/admin/src/containers/AuthPage/components/Logo/Img.js +7 -0
  295. package/admin/src/containers/AuthPage/components/Logo/index.js +7 -0
  296. package/admin/src/containers/AuthPage/components/Oops/Img.js +7 -0
  297. package/admin/src/containers/AuthPage/components/Oops/index.js +63 -0
  298. package/admin/src/containers/AuthPage/components/Register/CustomLabel.js +28 -0
  299. package/admin/src/containers/AuthPage/components/Register/InputWrapper.js +8 -0
  300. package/admin/src/containers/AuthPage/components/Register/Span.js +13 -0
  301. package/admin/src/containers/AuthPage/components/Register/index.js +173 -0
  302. package/admin/src/containers/AuthPage/components/ResetPassword/index.js +73 -0
  303. package/admin/src/containers/AuthPage/components/Section/index.js +22 -0
  304. package/admin/src/containers/AuthPage/index.js +321 -0
  305. package/admin/src/containers/AuthPage/init.js +5 -0
  306. package/admin/src/containers/AuthPage/reducer.js +41 -0
  307. package/admin/src/containers/AuthPage/utils/forms.js +124 -0
  308. package/admin/src/containers/AuthPage/utils/index.js +2 -0
  309. package/admin/src/containers/HomePage/BlogPost.js +48 -0
  310. package/admin/src/containers/HomePage/SocialLink.js +52 -0
  311. package/admin/src/containers/HomePage/components.js +260 -0
  312. package/admin/src/containers/HomePage/hooks.js +54 -0
  313. package/admin/src/containers/HomePage/index.js +239 -0
  314. package/admin/src/containers/InstalledPluginsPage/ListWrapper.js +7 -0
  315. package/admin/src/containers/InstalledPluginsPage/Logo.js +36 -0
  316. package/admin/src/containers/InstalledPluginsPage/Row.js +98 -0
  317. package/admin/src/containers/InstalledPluginsPage/index.js +73 -0
  318. package/admin/src/containers/InstalledPluginsPage/utils/generateRows.js +19 -0
  319. package/admin/src/containers/LanguageProvider/actions.js +16 -0
  320. package/admin/src/containers/LanguageProvider/constants.js +8 -0
  321. package/admin/src/containers/LanguageProvider/hooks/useChangeLanguage.js +14 -0
  322. package/admin/src/containers/LanguageProvider/index.js +49 -0
  323. package/admin/src/containers/LanguageProvider/reducer.js +52 -0
  324. package/admin/src/containers/LanguageProvider/selectors.js +25 -0
  325. package/admin/src/containers/LeftMenu/Loader.js +34 -0
  326. package/admin/src/containers/LeftMenu/LoaderWrapper.js +13 -0
  327. package/admin/src/containers/LeftMenu/Wrapper.js +61 -0
  328. package/admin/src/containers/LeftMenu/actions.js +24 -0
  329. package/admin/src/containers/LeftMenu/constants.js +4 -0
  330. package/admin/src/containers/LeftMenu/index.js +101 -0
  331. package/admin/src/containers/LeftMenu/reducer.js +79 -0
  332. package/admin/src/containers/LeftMenu/selectors.js +3 -0
  333. package/admin/src/containers/LeftMenu/useMenuSections.js +62 -0
  334. package/admin/src/containers/LeftMenu/utils/checkPermissions.js +13 -0
  335. package/admin/src/containers/LeftMenu/utils/generateModelsLinks.js +61 -0
  336. package/admin/src/containers/LeftMenu/utils/getCtOrStLinks.js +49 -0
  337. package/admin/src/containers/LeftMenu/utils/getGeneralLinks.js +42 -0
  338. package/admin/src/containers/LeftMenu/utils/getPluginSectionLinks.js +17 -0
  339. package/admin/src/containers/LeftMenu/utils/getSettingsMenuLinksPermissions.js +20 -0
  340. package/admin/src/containers/LeftMenu/utils/index.js +2 -0
  341. package/admin/src/containers/LeftMenu/utils/toPluginLinks.js +19 -0
  342. package/admin/src/containers/LocaleToggle/Wrapper.js +147 -0
  343. package/admin/src/containers/LocaleToggle/actions.js +19 -0
  344. package/admin/src/containers/LocaleToggle/constants.js +8 -0
  345. package/admin/src/containers/LocaleToggle/index.js +84 -0
  346. package/admin/src/containers/LocaleToggle/reducer.js +25 -0
  347. package/admin/src/containers/LocaleToggle/selectors.js +25 -0
  348. package/admin/src/containers/MarketplacePage/MarketplaceBanner/Wrapper.js +29 -0
  349. package/admin/src/containers/MarketplacePage/MarketplaceBanner/index.js +37 -0
  350. package/admin/src/containers/MarketplacePage/PluginCard/Wrapper.js +148 -0
  351. package/admin/src/containers/MarketplacePage/PluginCard/index.js +184 -0
  352. package/admin/src/containers/MarketplacePage/Wrapper.js +10 -0
  353. package/admin/src/containers/MarketplacePage/index.js +103 -0
  354. package/admin/src/containers/NewNotification/Notification/index.js +181 -0
  355. package/admin/src/containers/NewNotification/Notification/styledComponents.js +66 -0
  356. package/admin/src/containers/NewNotification/Wrapper.js +19 -0
  357. package/admin/src/containers/NewNotification/actions.js +9 -0
  358. package/admin/src/containers/NewNotification/constants.js +2 -0
  359. package/admin/src/containers/NewNotification/index.js +35 -0
  360. package/admin/src/containers/NewNotification/reducer.js +49 -0
  361. package/admin/src/containers/NotFoundPage/index.js +24 -0
  362. package/admin/src/containers/NotificationProvider/actions.js +37 -0
  363. package/admin/src/containers/NotificationProvider/constants.js +8 -0
  364. package/admin/src/containers/NotificationProvider/index.js +45 -0
  365. package/admin/src/containers/NotificationProvider/reducer.js +48 -0
  366. package/admin/src/containers/NotificationProvider/selectors.js +27 -0
  367. package/admin/src/containers/Onboarding/Li.js +150 -0
  368. package/admin/src/containers/Onboarding/StaticLinks/StyledLink.js +23 -0
  369. package/admin/src/containers/Onboarding/StaticLinks/index.js +45 -0
  370. package/admin/src/containers/Onboarding/Video.js +180 -0
  371. package/admin/src/containers/Onboarding/Wrapper.js +131 -0
  372. package/admin/src/containers/Onboarding/index.js +134 -0
  373. package/admin/src/containers/Onboarding/init.js +5 -0
  374. package/admin/src/containers/Onboarding/reducer.js +62 -0
  375. package/admin/src/containers/Onboarding/utils/formatAndStoreVideoArray.js +27 -0
  376. package/admin/src/containers/PermissionsManager/actions.js +25 -0
  377. package/admin/src/containers/PermissionsManager/constants.js +5 -0
  378. package/admin/src/containers/PermissionsManager/index.js +49 -0
  379. package/admin/src/containers/PermissionsManager/reducer.js +66 -0
  380. package/admin/src/containers/PluginDispatcher/index.js +69 -0
  381. package/admin/src/containers/PrivateRoute/index.js +39 -0
  382. package/admin/src/containers/ProfilePage/components.js +9 -0
  383. package/admin/src/containers/ProfilePage/index.js +160 -0
  384. package/admin/src/containers/ProfilePage/utils/form.js +36 -0
  385. package/admin/src/containers/ProfilePage/utils/index.js +2 -0
  386. package/admin/src/containers/ProfilePage/utils/schema.js +6 -0
  387. package/admin/src/containers/Roles/CreatePage/index.js +8 -0
  388. package/admin/src/containers/Roles/EditPage/index.js +172 -0
  389. package/admin/src/containers/Roles/EditPage/utils/schema.js +8 -0
  390. package/admin/src/containers/Roles/ListPage/BaselineAlignment.js +8 -0
  391. package/admin/src/containers/Roles/ListPage/index.js +149 -0
  392. package/admin/src/containers/Roles/ProtectedEditPage/index.js +31 -0
  393. package/admin/src/containers/Roles/ProtectedListPage/index.js +12 -0
  394. package/admin/src/containers/SettingsHeaderSearchContextProvider/index.js +17 -0
  395. package/admin/src/containers/SettingsPage/components/ApplicationDetailLink/Icon.js +13 -0
  396. package/admin/src/containers/SettingsPage/components/ApplicationDetailLink/Link.js +25 -0
  397. package/admin/src/containers/SettingsPage/components/ApplicationDetailLink/Notif.js +17 -0
  398. package/admin/src/containers/SettingsPage/components/ApplicationDetailLink/Wrapper.js +9 -0
  399. package/admin/src/containers/SettingsPage/components/ApplicationDetailLink/index.js +26 -0
  400. package/admin/src/containers/SettingsPage/components/MenuWrapper/index.js +9 -0
  401. package/admin/src/containers/SettingsPage/components/SettingDispatcher/index.js +27 -0
  402. package/admin/src/containers/SettingsPage/components/StyledLeftMenu/index.js +13 -0
  403. package/admin/src/containers/SettingsPage/components/Wrapper/index.js +19 -0
  404. package/admin/src/containers/SettingsPage/components/index.js +5 -0
  405. package/admin/src/containers/SettingsPage/index.js +132 -0
  406. package/admin/src/containers/SettingsPage/utils/createPluginsLinksRoutes.js +23 -0
  407. package/admin/src/containers/SettingsPage/utils/createRoute.js +8 -0
  408. package/admin/src/containers/SettingsPage/utils/customRoutes.js +3 -0
  409. package/admin/src/containers/SettingsPage/utils/defaultRoutes.js +65 -0
  410. package/admin/src/containers/SettingsPage/utils/findFirstAllowedEndpoint.js +14 -0
  411. package/admin/src/containers/SettingsPage/utils/getSectionsToDisplay.js +5 -0
  412. package/admin/src/containers/SettingsPage/utils/index.js +6 -0
  413. package/admin/src/containers/SettingsPage/utils/makeUniqueRoutes.js +6 -0
  414. package/admin/src/containers/SettingsPage/utils/routes.js +4 -0
  415. package/admin/src/containers/Theme/index.js +14 -0
  416. package/admin/src/containers/Users/EditPage/index.js +137 -0
  417. package/admin/src/containers/Users/EditPage/utils/form.js +52 -0
  418. package/admin/src/containers/Users/ListPage/Header.js +78 -0
  419. package/admin/src/containers/Users/ListPage/ModalForm.js +101 -0
  420. package/admin/src/containers/Users/ListPage/index.js +289 -0
  421. package/admin/src/containers/Users/ListPage/init.js +3 -0
  422. package/admin/src/containers/Users/ListPage/reducer.js +57 -0
  423. package/admin/src/containers/Users/ListPage/stepper.js +18 -0
  424. package/admin/src/containers/Users/ListPage/utils/getFilters.js +30 -0
  425. package/admin/src/containers/Users/ProtectedEditPage/index.js +45 -0
  426. package/admin/src/containers/Users/ProtectedListPage/index.js +12 -0
  427. package/admin/src/containers/Webhooks/EditView/Wrapper.js +61 -0
  428. package/admin/src/containers/Webhooks/EditView/index.js +448 -0
  429. package/admin/src/containers/Webhooks/EditView/reducer.js +76 -0
  430. package/admin/src/containers/Webhooks/EditView/utils/fieldsRegex.js +4 -0
  431. package/admin/src/containers/Webhooks/EditView/utils/form.js +38 -0
  432. package/admin/src/containers/Webhooks/EditView/utils/formatData.js +26 -0
  433. package/admin/src/containers/Webhooks/EditView/utils/index.js +3 -0
  434. package/admin/src/containers/Webhooks/EditView/utils/schema.js +38 -0
  435. package/admin/src/containers/Webhooks/ListView/Wrapper.js +31 -0
  436. package/admin/src/containers/Webhooks/ListView/index.js +320 -0
  437. package/admin/src/containers/Webhooks/ListView/reducer.js +43 -0
  438. package/admin/src/containers/Webhooks/ProtectedCreateView/index.js +12 -0
  439. package/admin/src/containers/Webhooks/ProtectedEditView/index.js +12 -0
  440. package/admin/src/containers/Webhooks/ProtectedListView/index.js +12 -0
  441. package/admin/src/contexts/MarketPlace/index.js +25 -0
  442. package/admin/src/contexts/PermisssionsDataManagerContext/index.js +5 -0
  443. package/admin/src/contexts/SettingsHeaderSearchContext/index.js +5 -0
  444. package/admin/src/contexts/index.js +2 -0
  445. package/admin/src/favicon.png +0 -0
  446. package/admin/src/hooks/index.js +9 -0
  447. package/admin/src/hooks/useFetchPermissionsLayout/index.js +32 -0
  448. package/admin/src/hooks/useFetchPermissionsLayout/reducer.js +35 -0
  449. package/admin/src/hooks/useFetchPluginsFromMarketPlace/index.js +49 -0
  450. package/admin/src/hooks/useFetchRole/index.js +58 -0
  451. package/admin/src/hooks/useFetchRole/reducer.js +33 -0
  452. package/admin/src/hooks/useModels/index.js +47 -0
  453. package/admin/src/hooks/useModels/reducer.js +45 -0
  454. package/admin/src/hooks/usePermissionsDataManager/index.js +6 -0
  455. package/admin/src/hooks/useRolesList/index.js +49 -0
  456. package/admin/src/hooks/useRolesList/init.js +5 -0
  457. package/admin/src/hooks/useRolesList/reducer.js +31 -0
  458. package/admin/src/hooks/useSettingsForm/index.js +136 -0
  459. package/admin/src/hooks/useSettingsForm/init.js +5 -0
  460. package/admin/src/hooks/useSettingsForm/reducer.js +60 -0
  461. package/admin/src/hooks/useSettingsHeaderSearchContext/index.js +6 -0
  462. package/admin/src/hooks/useSettingsMenu/index.js +56 -0
  463. package/admin/src/hooks/useSettingsMenu/init.js +49 -0
  464. package/admin/src/hooks/useSettingsMenu/reducer.js +41 -0
  465. package/admin/src/hooks/useSettingsMenu/utils/customGlobalLinks.js +1 -0
  466. package/admin/src/hooks/useSettingsMenu/utils/defaultGlobalLinks.js +14 -0
  467. package/admin/src/hooks/useSettingsMenu/utils/formatLinks.js +12 -0
  468. package/admin/src/hooks/useSettingsMenu/utils/globalLinks.js +4 -0
  469. package/admin/src/i18n.js +17 -0
  470. package/admin/src/index.html +16 -0
  471. package/admin/src/permissions/customPermissions.js +1 -0
  472. package/admin/src/permissions/defaultPermissions.js +60 -0
  473. package/admin/src/permissions/index.js +7 -0
  474. package/admin/src/plugins.js +37 -0
  475. package/admin/src/public-path.js +40 -0
  476. package/admin/src/reducers.js +28 -0
  477. package/admin/src/themes/colors.js +51 -0
  478. package/admin/src/themes/fontWeights.js +8 -0
  479. package/admin/src/themes/index.js +13 -0
  480. package/admin/src/themes/sizes.js +31 -0
  481. package/admin/src/translations/ar.json +146 -0
  482. package/admin/src/translations/cs.json +183 -0
  483. package/admin/src/translations/de.json +371 -0
  484. package/admin/src/translations/dk.json +348 -0
  485. package/admin/src/translations/en.json +374 -0
  486. package/admin/src/translations/es.json +338 -0
  487. package/admin/src/translations/fr.json +232 -0
  488. package/admin/src/translations/he.json +364 -0
  489. package/admin/src/translations/id.json +337 -0
  490. package/admin/src/translations/index.js +86 -0
  491. package/admin/src/translations/it.json +347 -0
  492. package/admin/src/translations/ja.json +288 -0
  493. package/admin/src/translations/ko.json +179 -0
  494. package/admin/src/translations/ms.json +223 -0
  495. package/admin/src/translations/nl.json +221 -0
  496. package/admin/src/translations/no.json +349 -0
  497. package/admin/src/translations/pl.json +372 -0
  498. package/admin/src/translations/pt-BR.json +228 -0
  499. package/admin/src/translations/pt.json +225 -0
  500. package/admin/src/translations/ru.json +368 -0
  501. package/admin/src/translations/sk.json +337 -0
  502. package/admin/src/translations/sv.json +127 -0
  503. package/admin/src/translations/th.json +332 -0
  504. package/admin/src/translations/tr.json +371 -0
  505. package/admin/src/translations/uk.json +223 -0
  506. package/admin/src/translations/vi.json +179 -0
  507. package/admin/src/translations/zh-Hans.json +371 -0
  508. package/admin/src/translations/zh.json +152 -0
  509. package/admin/src/utils/ComponentApi.js +42 -0
  510. package/admin/src/utils/FieldApi.js +48 -0
  511. package/admin/src/utils/MiddlewareApi.js +15 -0
  512. package/admin/src/utils/Plugin.js +50 -0
  513. package/admin/src/utils/Strapi.js +28 -0
  514. package/admin/src/utils/basename.js +3 -0
  515. package/admin/src/utils/checkFormValidity.js +15 -0
  516. package/admin/src/utils/checkLatestStrapiVersion.js +11 -0
  517. package/admin/src/utils/checkStore.js +24 -0
  518. package/admin/src/utils/constants.js +3 -0
  519. package/admin/src/utils/formatAPIErrors.js +17 -0
  520. package/admin/src/utils/getAttributesToDisplay.js +21 -0
  521. package/admin/src/utils/getExistingActions.js +34 -0
  522. package/admin/src/utils/getRequestUrl.js +3 -0
  523. package/admin/src/utils/history.js +6 -0
  524. package/admin/src/utils/index.js +9 -0
  525. package/admin/src/utils/injectReducer.js +56 -0
  526. package/admin/src/utils/injectSaga.js +76 -0
  527. package/admin/src/utils/reducerInjectors.js +38 -0
  528. package/admin/src/utils/retrieveGlobalLinks.js +17 -0
  529. package/admin/src/utils/retrievePluginsMenu.js +17 -0
  530. package/admin/src/utils/sagaInjectors.js +94 -0
  531. package/admin/src/utils/sortLinks.js +5 -0
  532. package/admin/src/validations/users/edit.js +11 -0
  533. package/admin/src/validations/users/index.js +3 -0
  534. package/admin/src/validations/users/profile.js +29 -0
  535. package/admin/src/validations/users/roles.js +11 -0
  536. package/config/admin-actions.js +122 -0
  537. package/config/admin-conditions.js +26 -0
  538. package/config/email-templates/forgot-password.js +25 -0
  539. package/config/functions/bootstrap.js +67 -0
  540. package/config/functions/register.js +7 -0
  541. package/config/layout.js +10 -0
  542. package/config/migrations/permissions-fields-to-properties.js +104 -0
  543. package/config/policies/hasPermissions.js +51 -0
  544. package/config/policies/isAuthenticatedAdmin.js +9 -0
  545. package/config/routes.json +320 -0
  546. package/config/settings.js +9 -0
  547. package/controllers/Webhooks.js +164 -0
  548. package/controllers/admin.js +101 -0
  549. package/controllers/authenticated-user.js +43 -0
  550. package/controllers/authentication.js +181 -0
  551. package/controllers/formatters/conditions.js +12 -0
  552. package/controllers/formatters/format-actions-by-sections.js +37 -0
  553. package/controllers/formatters/index.js +9 -0
  554. package/controllers/permission.js +51 -0
  555. package/controllers/role.js +148 -0
  556. package/controllers/user.js +136 -0
  557. package/doc/change-the-login-page-logo.md +28 -0
  558. package/doc/customize-menu.md +17 -0
  559. package/doc/disable-tracking.md +16 -0
  560. package/domain/action/index.js +142 -0
  561. package/domain/action/provider.js +83 -0
  562. package/domain/condition/index.js +92 -0
  563. package/domain/condition/provider.js +42 -0
  564. package/domain/permission/index.js +140 -0
  565. package/domain/role.js +29 -0
  566. package/domain/user.js +25 -0
  567. package/ee/LICENSE +21 -0
  568. package/ee/admin/components/ProviderButton/ProviderButtonStyles.js +31 -0
  569. package/ee/admin/components/ProviderButton/index.js +42 -0
  570. package/ee/admin/components/Roles/ConditionsModal/ConditionsSelect/MenuList/utils/constants.js +3 -0
  571. package/ee/admin/components/Roles/ContentTypeCollapse/Collapse/utils/constants.js +3 -0
  572. package/ee/admin/components/Roles/ContentTypeCollapse/CollapsePropertyMatrix/ActionRow/utils/constants.js +3 -0
  573. package/ee/admin/components/Roles/ContentTypeCollapse/CollapsePropertyMatrix/SubActionRow/utils/constants.js +3 -0
  574. package/ee/admin/components/Roles/GlobalActions/utils/constants.js +3 -0
  575. package/ee/admin/components/Roles/PluginsAndSettings/SubCategory/utils/constants.js +3 -0
  576. package/ee/admin/components/Roles/RoleForm/index.js +72 -0
  577. package/ee/admin/components/Users/MagicLink/index.js +36 -0
  578. package/ee/admin/components/Users/ModalCreateBody/utils/formDataModel.js +14 -0
  579. package/ee/admin/components/Users/ModalCreateBody/utils/roleSettingsForm.js +21 -0
  580. package/ee/admin/containers/App/utils/customRoutes.js +11 -0
  581. package/ee/admin/containers/AuthPage/components/Login/index.js +88 -0
  582. package/ee/admin/containers/AuthPage/components/Providers/index.js +76 -0
  583. package/ee/admin/containers/AuthPage/utils/forms.js +16 -0
  584. package/ee/admin/containers/AuthResponse/index.js +62 -0
  585. package/ee/admin/containers/Roles/CreatePage/index.js +215 -0
  586. package/ee/admin/containers/Roles/CreatePage/utils/schema.js +8 -0
  587. package/ee/admin/containers/Roles/ListPage/BaselineAlignment.js +8 -0
  588. package/ee/admin/containers/Roles/ListPage/CustomCheckbox.js +12 -0
  589. package/ee/admin/containers/Roles/ListPage/RoleRow.js +99 -0
  590. package/ee/admin/containers/Roles/ListPage/index.js +260 -0
  591. package/ee/admin/containers/Roles/ListPage/reducer.js +60 -0
  592. package/ee/admin/containers/Roles/ProtectedListPage/index.js +12 -0
  593. package/ee/admin/containers/SettingsPage/SingleSignOn/index.js +113 -0
  594. package/ee/admin/containers/SettingsPage/SingleSignOn/utils/form.js +28 -0
  595. package/ee/admin/containers/SettingsPage/SingleSignOn/utils/index.js +2 -0
  596. package/ee/admin/containers/SettingsPage/SingleSignOn/utils/schema.js +11 -0
  597. package/ee/admin/containers/SettingsPage/utils/customRoutes.js +16 -0
  598. package/ee/admin/hooks/index.js +2 -0
  599. package/ee/admin/hooks/useAuthProviders/index.js +51 -0
  600. package/ee/admin/hooks/useAuthProviders/reducer.js +26 -0
  601. package/ee/admin/hooks/useSettingsMenu/utils/customGlobalLinks.js +18 -0
  602. package/ee/admin/permissions/customPermissions.js +11 -0
  603. package/ee/config/admin-actions.js +24 -0
  604. package/ee/config/functions/bootstrap.js +19 -0
  605. package/ee/config/routes.json +28 -0
  606. package/ee/controllers/authentication/constants.js +11 -0
  607. package/ee/controllers/authentication/index.js +11 -0
  608. package/ee/controllers/authentication/middlewares.js +114 -0
  609. package/ee/controllers/authentication/utils.js +23 -0
  610. package/ee/controllers/authentication.js +68 -0
  611. package/ee/controllers/permission.js +21 -0
  612. package/ee/controllers/role.js +116 -0
  613. package/ee/controllers/user.js +36 -0
  614. package/ee/middlewares/features-routes/defaults.json +5 -0
  615. package/ee/middlewares/features-routes/index.js +23 -0
  616. package/ee/middlewares/features-routes/routes.js +43 -0
  617. package/ee/services/passport/provider-registry.js +27 -0
  618. package/ee/services/passport/sso.js +25 -0
  619. package/ee/services/passport.js +32 -0
  620. package/ee/services/role.js +22 -0
  621. package/ee/validation/authentication.js +25 -0
  622. package/ee/validation/permission.js +16 -0
  623. package/ee/validation/role.js +77 -0
  624. package/ee/validation/user.js +29 -0
  625. package/index.html +16 -0
  626. package/index.js +374 -0
  627. package/middlewares/auth/defaults.json +5 -0
  628. package/middlewares/auth/index.js +39 -0
  629. package/models/Permission.js +7 -0
  630. package/models/Permission.settings.json +49 -0
  631. package/models/Role.js +7 -0
  632. package/models/Role.settings.json +50 -0
  633. package/models/User.js +7 -0
  634. package/models/User.settings.json +88 -0
  635. package/package.json +137 -0
  636. package/services/action.js +34 -0
  637. package/services/auth.js +113 -0
  638. package/services/condition.js +14 -0
  639. package/services/constants.js +12 -0
  640. package/services/content-type.js +206 -0
  641. package/services/metrics.js +16 -0
  642. package/services/passport/local-strategy.js +21 -0
  643. package/services/passport.js +47 -0
  644. package/services/permission/engine-hooks.js +82 -0
  645. package/services/permission/engine.js +275 -0
  646. package/services/permission/permissions-manager/index.js +85 -0
  647. package/services/permission/permissions-manager/query-builers.js +86 -0
  648. package/services/permission/queries.js +241 -0
  649. package/services/permission/sections-builder/builder.js +84 -0
  650. package/services/permission/sections-builder/handlers.js +154 -0
  651. package/services/permission/sections-builder/index.js +50 -0
  652. package/services/permission/sections-builder/section.js +71 -0
  653. package/services/permission/sections-builder/utils.js +26 -0
  654. package/services/permission.js +30 -0
  655. package/services/role.js +469 -0
  656. package/services/token.js +57 -0
  657. package/services/user.js +348 -0
  658. package/utils/index.js +11 -0
  659. package/validation/action-provider.js +85 -0
  660. package/validation/authentication/forgot-password.js +20 -0
  661. package/validation/authentication/index.js +17 -0
  662. package/validation/authentication/register.js +63 -0
  663. package/validation/authentication/reset-password.js +21 -0
  664. package/validation/common-functions/check-fields-are-correctly-nested.js +26 -0
  665. package/validation/common-functions/check-fields-dont-have-duplicates.js +16 -0
  666. package/validation/common-functions/index.js +9 -0
  667. package/validation/common-validators.js +214 -0
  668. package/validation/permission.js +153 -0
  669. package/validation/policies/hasPermissions.js +37 -0
  670. package/validation/role.js +21 -0
  671. package/validation/user.js +84 -0
  672. package/webpack.alias.js +64 -0
  673. package/webpack.config.js +212 -0
@@ -0,0 +1,142 @@
1
+ 'use strict';
2
+
3
+ const { curry, pipe, merge, set, pick, omit, includes, isArray, prop } = require('lodash/fp');
4
+
5
+ /**
6
+ * Domain representation of an Action (RBAC)
7
+ * @typedef {Object} Action
8
+ * @property {string} actionId - The unique identifier of the action
9
+ * @property {string} section - The section linked to the action
10
+ * @property {string} displayName - The human readable name of an action
11
+ * @property {string} category - The main category of an action
12
+ * @property {string} [subCategory] - The secondary category of an action (only for settings and plugins section)
13
+ * @property {string} [pluginName] - The plugin which provide the action
14
+ * @property {string[]} [subjects] - A list of subjects on which the action can be applied
15
+ * @property {Object} options - The options of an action
16
+ * @property {string[]} options.applyToProperties - The list of properties that can be associated with an action
17
+ */
18
+
19
+ /**
20
+ * Set of attributes used to create a new {@link Action} object
21
+ * @typedef {Action, { uid: string }} CreateActionPayload
22
+ */
23
+
24
+ /**
25
+ * Return the default attributes of a new {@link Action}
26
+ * @return Partial<Action>
27
+ */
28
+ const getDefaultActionAttributes = () => ({
29
+ options: {
30
+ applyToProperties: null,
31
+ },
32
+ });
33
+
34
+ /**
35
+ * Get the list of all the valid attributes of an {@link Action}
36
+ * @return {string[]}
37
+ */
38
+ const actionFields = [
39
+ 'section',
40
+ 'displayName',
41
+ 'category',
42
+ 'subCategory',
43
+ 'pluginName',
44
+ 'subjects',
45
+ 'options',
46
+ 'actionId',
47
+ ];
48
+
49
+ /**
50
+ * Remove unwanted attributes from an {@link Action}
51
+ * @type {function(action: Action | CreateActionPayload): Action}
52
+ */
53
+ const sanitizeActionAttributes = pick(actionFields);
54
+
55
+ /**
56
+ * Create and return an identifier for an {@link CreateActionPayload}.
57
+ * The format is based on the action's source ({@link CreateActionPayload.pluginName} or 'application') and {@link CreateActionPayload.uid}.
58
+ * @param {CreateActionPayload} attributes
59
+ * @return {string}
60
+ */
61
+ const computeActionId = attributes => {
62
+ const { pluginName, uid } = attributes;
63
+
64
+ if (!pluginName) {
65
+ return `application::${uid}`;
66
+ }
67
+
68
+ if (pluginName === 'admin') {
69
+ return `admin::${uid}`;
70
+ }
71
+
72
+ return `plugins::${pluginName}.${uid}`;
73
+ };
74
+
75
+ /**
76
+ * Assign an actionId attribute to an {@link CreateActionPayload} object
77
+ * @param {CreateActionPayload} attrs - Payload used to create an action
78
+ * @return {CreateActionPayload}
79
+ */
80
+ const assignActionId = attrs => set('actionId', computeActionId(attrs), attrs);
81
+
82
+ /**
83
+ * Transform an action by adding or removing the {@link Action.subCategory} attribute
84
+ * @param {Action} action - The action to process
85
+ * @return {Action}
86
+ */
87
+ const assignOrOmitSubCategory = action => {
88
+ const shouldHaveSubCategory = ['settings', 'plugins'].includes(action.section);
89
+
90
+ return shouldHaveSubCategory
91
+ ? set('subCategory', action.subCategory || 'general', action)
92
+ : omit('subCategory', action);
93
+ };
94
+
95
+ /**
96
+ * Check if a property can be applied to an {@link Action}
97
+ * @type (function(property: string, action: Action): boolean) | (function(property: string): (function(action: Action): boolean))
98
+ * @return {boolean} Return true if the property can be applied for the given action
99
+ */
100
+ const appliesToProperty = curry((property, action) => {
101
+ return pipe(prop('options.applyToProperties'), includes(property))(action);
102
+ });
103
+
104
+ /**
105
+ * Check if an action applies to a subject
106
+ * @param {string} subject
107
+ * @param {Action} action
108
+ * @return {boolean}
109
+ */
110
+ const appliesToSubject = curry((subject, action) => {
111
+ return isArray(action.subjects) && includes(subject, action.subjects);
112
+ });
113
+
114
+ /**
115
+ * Transform the given attributes into a domain representation of an Action
116
+ * @type (function(payload: CreateActionPayload): Action)
117
+ * @param {CreateActionPayload} payload - The action payload containing the attributes needed to create an {@link Action}
118
+ * @return {Action} A newly created {@link Action}
119
+ */
120
+ const create = pipe(
121
+ // Create and assign an action identifier to the action
122
+ // (need to be done before the sanitizeActionAttributes since we need the uid here)
123
+ assignActionId,
124
+ // Add or remove the sub category field based on the pluginName attribute
125
+ assignOrOmitSubCategory,
126
+ // Remove unwanted attributes from the payload
127
+ sanitizeActionAttributes,
128
+ // Complete the action creation by adding default values for some attributes
129
+ merge(getDefaultActionAttributes())
130
+ );
131
+
132
+ module.exports = {
133
+ actionFields,
134
+ appliesToProperty,
135
+ appliesToSubject,
136
+ assignActionId,
137
+ assignOrOmitSubCategory,
138
+ create,
139
+ computeActionId,
140
+ getDefaultActionAttributes,
141
+ sanitizeActionAttributes,
142
+ };
@@ -0,0 +1,83 @@
1
+ 'use strict';
2
+
3
+ const { providerFactory, hooks } = require('strapi-utils');
4
+ const { validateRegisterProviderAction } = require('../../validation/action-provider');
5
+ const domain = require('./index');
6
+
7
+ /**
8
+ * @typedef ActionProviderOverride
9
+ * @property {function(CreateActionPayload)} register
10
+ * @property {function(attributes CreateActionPayload[]): Promise<this>} registerMany
11
+ */
12
+
13
+ /**
14
+ * Creates a new instance of an action provider
15
+ * @return {Provider & ActionProviderOverride}
16
+ */
17
+ const createActionProvider = options => {
18
+ const provider = providerFactory(options);
19
+ const actionHooks = {
20
+ appliesPropertyToSubject: hooks.createAsyncParallelHook(),
21
+ };
22
+
23
+ return {
24
+ ...provider,
25
+
26
+ hooks: {
27
+ ...provider.hooks,
28
+ ...actionHooks,
29
+ },
30
+
31
+ async register(actionAttributes) {
32
+ if (strapi.isLoaded) {
33
+ throw new Error(`You can't register new actions outside of the bootstrap function.`);
34
+ }
35
+
36
+ validateRegisterProviderAction([actionAttributes]);
37
+
38
+ const action = domain.create(actionAttributes);
39
+
40
+ return provider.register(action.actionId, action);
41
+ },
42
+
43
+ async registerMany(actionsAttributes) {
44
+ validateRegisterProviderAction(actionsAttributes);
45
+
46
+ for (const attributes of actionsAttributes) {
47
+ await this.register(attributes);
48
+ }
49
+
50
+ return this;
51
+ },
52
+
53
+ async appliesToProperty(property, actionId, subject) {
54
+ const action = provider.get(actionId);
55
+ const appliesToAction = domain.appliesToProperty(property, action);
56
+
57
+ // If the property isn't valid for this action, ignore the rest of the checks
58
+ if (!appliesToAction) {
59
+ return false;
60
+ }
61
+
62
+ // If the property is valid for this action and there isn't any subject
63
+ if (!subject) {
64
+ return true;
65
+ }
66
+
67
+ // If the property is valid for this action and the subject is not handled by the action
68
+ if (!domain.appliesToSubject(subject, action)) {
69
+ return false;
70
+ }
71
+
72
+ const results = await actionHooks.appliesPropertyToSubject.call({
73
+ property,
74
+ action,
75
+ subject,
76
+ });
77
+
78
+ return results.every(result => result !== false);
79
+ },
80
+ };
81
+ };
82
+
83
+ module.exports = createActionProvider;
@@ -0,0 +1,92 @@
1
+ 'use strict';
2
+
3
+ const { pipe, merge, set, pick } = require('lodash/fp');
4
+
5
+ /**
6
+ * The handler of a {@link Condition}
7
+ * @typedef {(function(user: Object, options: Object): Object | boolean)} ConditionHandler
8
+ */
9
+ /**
10
+ * Domain representation of a Condition (RBAC)
11
+ * @typedef {Object} Condition
12
+ * @property {string} id - The identifier of the condition
13
+ * @property {string} displayName - The display name of a condition
14
+ * @property {string} name - The name of a condition
15
+ * @property {string} [plugin] - The plugin which provide the condition
16
+ * @property {string} [category] - The main category of a condition
17
+ * @property {ConditionHandler} handler - The handler of a condition
18
+ */
19
+
20
+ /**
21
+ * Set of attributes used to create a new {@link Action} object
22
+ * @typedef {Condition, { uid: string }} CreateConditionPayload
23
+ */
24
+
25
+ const DEFAULT_CATEGORY = 'default';
26
+
27
+ /**
28
+ * Get the default value used for every condition
29
+ * @return {Condition}
30
+ */
31
+ const getDefaultConditionAttributes = () => ({
32
+ category: DEFAULT_CATEGORY,
33
+ });
34
+
35
+ /**
36
+ * Get the list of all the valid attributes of a {@link Condition}
37
+ * @return {string[]}
38
+ */
39
+ const conditionFields = ['id', 'displayName', 'handler', 'plugin', 'category'];
40
+
41
+ /**
42
+ * Remove unwanted attributes from a {@link Condition}
43
+ * @type {function(action: Condition | CreateConditionPayload): Condition}
44
+ */
45
+ const sanitizeConditionAttributes = pick(conditionFields);
46
+
47
+ /**
48
+ *
49
+ * @param condition
50
+ * @return {string}
51
+ */
52
+ const computeConditionId = condition => {
53
+ const { name, plugin } = condition;
54
+
55
+ if (!plugin) {
56
+ return `application::${name}`;
57
+ }
58
+
59
+ if (plugin === 'admin') {
60
+ return `admin::${name}`;
61
+ }
62
+
63
+ return `plugins::${plugin}.${name}`;
64
+ };
65
+
66
+ /**
67
+ * Assign an id attribute to a {@link CreateConditionPayload} object
68
+ * @param {CreateConditionPayload} attrs - Payload used to create a condition
69
+ * @return {CreateConditionPayload}
70
+ */
71
+ const assignConditionId = attrs => set('id', computeConditionId(attrs), attrs);
72
+
73
+ /**
74
+ * Transform the given attributes into a domain representation of a Condition
75
+ * @type (function(CreateConditionPayload): Condition)
76
+ * @param {CreateConditionPayload} payload - The condition payload containing the attributes needed to create a {@link Condition}
77
+ * @return {Condition}
78
+ */
79
+ const create = pipe(
80
+ assignConditionId,
81
+ sanitizeConditionAttributes,
82
+ merge(getDefaultConditionAttributes())
83
+ );
84
+
85
+ module.exports = {
86
+ assignConditionId,
87
+ computeConditionId,
88
+ conditionFields,
89
+ create,
90
+ getDefaultConditionAttributes,
91
+ sanitizeConditionAttributes,
92
+ };
@@ -0,0 +1,42 @@
1
+ 'use strict';
2
+
3
+ const { providerFactory } = require('strapi-utils');
4
+ const domain = require('./');
5
+
6
+ /**
7
+ * @typedef ConditionProviderOverride
8
+ * @property {function(CreateConditionPayload)} register
9
+ * @property {function(attributes CreateConditionPayload[]): Promise<this>} registerMany
10
+ */
11
+
12
+ /**
13
+ * Creates a new instance of a condition provider
14
+ * @return {Provider & ConditionProviderOverride}
15
+ */
16
+ const createConditionProvider = () => {
17
+ const provider = providerFactory();
18
+
19
+ return {
20
+ ...provider,
21
+
22
+ async register(conditionAttributes) {
23
+ if (strapi.isLoaded) {
24
+ throw new Error(`You can't register new conditions outside of the bootstrap function.`);
25
+ }
26
+
27
+ const condition = domain.create(conditionAttributes);
28
+
29
+ return provider.register(condition.id, condition);
30
+ },
31
+
32
+ async registerMany(conditionsAttributes) {
33
+ for (const attributes of conditionsAttributes) {
34
+ await this.register(attributes);
35
+ }
36
+
37
+ return this;
38
+ },
39
+ };
40
+ };
41
+
42
+ module.exports = createConditionProvider;
@@ -0,0 +1,140 @@
1
+ 'use strict';
2
+
3
+ const {
4
+ pipe,
5
+ set,
6
+ pick,
7
+ eq,
8
+ omit,
9
+ remove,
10
+ get,
11
+ uniq,
12
+ isArray,
13
+ map,
14
+ curry,
15
+ merge,
16
+ } = require('lodash/fp');
17
+
18
+ /**
19
+ * Domain representation of a Permission (RBAC)
20
+ * @typedef {Object} Permission
21
+ * @property {string} [id] - The unique identifier of the permission
22
+ * @property {string} [role] - The role associated to a permission
23
+ * @property {string} action - The human readable name of an action
24
+ * @property {string} properties - A set of properties used to define the permission with more granularity
25
+ * @property {string} conditions - Conditions to check when evaluating the permission
26
+ * @property {string} subject - The subject on which the permission should applies
27
+ */
28
+
29
+ const permissionFields = ['id', 'action', 'subject', 'properties', 'conditions', 'role'];
30
+ const sanitizedPermissionFields = ['id', 'action', 'subject', 'properties', 'conditions'];
31
+
32
+ const sanitizePermissionFields = pick(sanitizedPermissionFields);
33
+
34
+ /**
35
+ * Creates a permission with default values
36
+ * @return {Permission}
37
+ */
38
+ const getDefaultPermission = () => ({
39
+ conditions: [],
40
+ properties: {},
41
+ subject: null,
42
+ });
43
+
44
+ /**
45
+ * Returns a new permission with the given condition
46
+ * @param {string} condition - The condition to add
47
+ * @param {Permission} permission - The permission on which we want to add the condition
48
+ * @return {Permission}
49
+ */
50
+ const addCondition = curry((condition, permission) => {
51
+ const { conditions } = permission;
52
+ const newConditions = Array.isArray(conditions)
53
+ ? uniq(conditions.concat(condition))
54
+ : [condition];
55
+
56
+ return set('conditions', newConditions, permission);
57
+ });
58
+
59
+ /**
60
+ * Returns a new permission without the given condition
61
+ * @param {string} condition - The condition to remove
62
+ * @param {Permission} permission - The permission on which we want to remove the condition
63
+ * @return {Permission}
64
+ */
65
+ const removeCondition = curry((condition, permission) => {
66
+ return set('conditions', remove(eq(condition), permission.conditions), permission);
67
+ });
68
+
69
+ /**
70
+ * Gets a property or a part of a property from a permission.
71
+ * @param {string} property - The property to get
72
+ * @param {Permission} permission - The permission on which we want to access the property
73
+ * @return {Permission}
74
+ */
75
+ const getProperty = curry((property, permission) => get(`properties.${property}`, permission));
76
+
77
+ /**
78
+ * Set a value for a given property on a new permission object
79
+ * @param {string} property - The name of the property
80
+ * @param {any} value - The value of the property
81
+ * @param {Permission} permission - The permission on which we want to set the property
82
+ * @return {Permission}
83
+ */
84
+ const setProperty = (property, value, permission) => {
85
+ return set(`properties.${property}`, value, permission);
86
+ };
87
+
88
+ /**
89
+ * Returns a new permission without the given property name set
90
+ * @param {string} property - The name of the property to delete
91
+ * @param {Permission} permission - The permission on which we want to remove the property
92
+ * @return {Permission}
93
+ */
94
+ const deleteProperty = (property, permission) => omit(`properties.${property}`, permission);
95
+
96
+ /**
97
+ * Creates a new {@link Permission} object from raw attributes. Set default values for certain fields
98
+ * @param {Permission} attributes
99
+ * @return {Permission}
100
+ */
101
+ const create = attributes => {
102
+ return pipe(pick(permissionFields), merge(getDefaultPermission()))(attributes);
103
+ };
104
+
105
+ /**
106
+ * Using the given condition provider, check and remove invalid condition from the permission's condition array.
107
+ * @param {object} provider - The condition provider used to do the checks
108
+ * @param {Permission} permission - The condition to sanitize
109
+ * @return {Permission}
110
+ */
111
+ const sanitizeConditions = curry((provider, permission) => {
112
+ if (!isArray(permission.conditions)) {
113
+ return permission;
114
+ }
115
+
116
+ return permission.conditions
117
+ .filter(condition => !provider.has(condition))
118
+ .reduce((perm, condition) => removeCondition(condition, perm), permission);
119
+ });
120
+
121
+ /**
122
+ * Transform raw attributes into valid permissions using the create domain function.
123
+ * @param {object | object[]} payload - Can either be a single object of attributes or an array of those objects.
124
+ * @return {Permission | Permission[]}
125
+ */
126
+ const toPermission = payload => (isArray(payload) ? map(create, payload) : create(payload));
127
+
128
+ module.exports = {
129
+ addCondition,
130
+ removeCondition,
131
+ create,
132
+ deleteProperty,
133
+ permissionFields,
134
+ getProperty,
135
+ sanitizedPermissionFields,
136
+ sanitizeConditions,
137
+ sanitizePermissionFields,
138
+ setProperty,
139
+ toPermission,
140
+ };
package/domain/role.js ADDED
@@ -0,0 +1,29 @@
1
+ 'use strict';
2
+
3
+ const {
4
+ contentTypes: { hasDraftAndPublish },
5
+ } = require('strapi-utils');
6
+ const {
7
+ AUTHOR_CODE,
8
+ PUBLISH_ACTION,
9
+ DELETE_ACTION,
10
+ UPDATE_ACTION,
11
+ CREATE_ACTION,
12
+ READ_ACTION,
13
+ } = require('../services/constants');
14
+
15
+ const BOUND_ACTIONS = [READ_ACTION, CREATE_ACTION, UPDATE_ACTION, DELETE_ACTION, PUBLISH_ACTION];
16
+
17
+ const BOUND_ACTIONS_FOR_FIELDS = [READ_ACTION, CREATE_ACTION, UPDATE_ACTION];
18
+
19
+ const getBoundActionsBySubject = (role, subject) => {
20
+ const model = strapi.getModel(subject);
21
+
22
+ if (role.code === AUTHOR_CODE || !hasDraftAndPublish(model)) {
23
+ return [READ_ACTION, UPDATE_ACTION, CREATE_ACTION, DELETE_ACTION];
24
+ }
25
+
26
+ return BOUND_ACTIONS;
27
+ };
28
+
29
+ module.exports = { getBoundActionsBySubject, BOUND_ACTIONS, BOUND_ACTIONS_FOR_FIELDS };
package/domain/user.js ADDED
@@ -0,0 +1,25 @@
1
+ 'use strict';
2
+
3
+ const { SUPER_ADMIN_CODE } = require('../services/constants');
4
+
5
+ /**
6
+ * Create a new user model by merging default and specified attributes
7
+ * @param attributes A partial user object
8
+ */
9
+ function createUser(attributes) {
10
+ return {
11
+ roles: [],
12
+ isActive: false,
13
+ username: null,
14
+ ...attributes,
15
+ };
16
+ }
17
+
18
+ const hasSuperAdminRole = user => {
19
+ return user.roles.filter(role => role.code === SUPER_ADMIN_CODE).length > 0;
20
+ };
21
+
22
+ module.exports = {
23
+ createUser,
24
+ hasSuperAdminRole,
25
+ };
package/ee/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ This Strapi Enterprise Edition (EE) supplemental license (this “EE Supplemental License”) governs the use of this software and documentation (collectively, the “EE Software”) by you and any entity you represent (collectively, “You”). If You have separately entered into the Strapi, Inc. Enterprise Agreement (the “Enterprise Agreement”), then this EE Supplemental License hereby incorporates by reference the Enterprise Agreement and modifies the Enterprise Agreement solely to the extent set forth herein. If You have separately entered into the Strapi, Inc. Subscription Agreement (the “Subscription Agreement”), then this EE Supplemental License hereby incorporates by reference the Agreement and modifies the Subscription Agreement solely to the extent set forth herein. If You have not entered into either the Enterprise Agreement or the Subscription Agreement, then You may use the EE Software solely as set forth in Section 2 below.
2
+
3
+ In the event of a direct conflict between the terms of this EE Supplemental License and the terms of the Enterprise Agreement or the Subscription Agreement, as applicable, the terms of this EE Supplemental License will control. Except to the extent modified by this EE Supplemental License, the Enterprise Agreement or the Subscription Agreement, as applicable, remain in full force and effect in accordance with its terms.
4
+
5
+ By using the EE Software, You hereby agree to the below terms and conditions.
6
+
7
+ 1. Notwithstanding any terms to the contrary in the Enterprise Agreement or Subscription Agreement, You may copy, modify and publish patches to the EE Software in a production environment (such copies, “Production Copies,” such modifications, “Production Modifications” and such patches, “Production Patches”) if and only if (a) You have agreed to, and are in full compliance with, the Enterprise Agreement or Subscription Agreement, as applicable, and (b) You have a valid license to the EE Software for the correct number of projects. You agree that Strapi and/or its licensors (as applicable) will own all right, title and interest in and to all such Production Copies, Production Modifications and Production Patches. You may display and/or distribute such Production Copies, Production Modifications and Production Patches if and only if (i) You have a valid license to the EE Software for the correct number of projects and (ii) You are in compliance with the Enterprise Agreement or Subscription Agreement, as applicable. You hereby assign to Strapi all right, title and interest in and to all Production Copies, Production Modifications and Production Patches, including all intellectual property rights embodied in or related to the foregoing.
8
+
9
+ 2. Notwithstanding the foregoing, You may copy and modify the EE Software solely for development and testing purposes (such copies, “Development Copies” and such modifications, “Development Modifications”) with or without a license to the EE Software if your use is in compliance with this Section 2. You agree that Strapi and/or its licensors (as applicable) will own all right, title and interest in and to all Development Copies and Development Modifications and You hereby assign to Strapi all right, title and interest in and to all Development Copies and Development Modifications, including all intellectual property rights embodied in or related to the foregoing. If You do not have a license to the EE Software, then You further agree as follows:
10
+
11
+ Other than as expressly set forth in this Section 2, You may not (a) copy or modify the EE Software, (b) create derivative works of the EE Software, (c) remove or modify any notice of any patent, copyright, trademark, or other proprietary rights that appear on or in the EE Software, (d) reverse engineer, decompile, translate, disassemble, or discover the source code of all or any portion of the EE Software, (e) publicly display all or any part of the EE Software, (f) distribute, disclose, market, lease, publish, merge, resell, assign, loan, sublicense, rent, or transfer the EE Software to any third party, (g) use the EE Software for any dial-up, remote access, interactive, or other on-line or hosted service, or to provide a service bureau, time share, or other services to third parties, (h) merge the EE Software into another product, (i) disclose the results of any EE Software performance benchmarks or test results to any third party without Strapi’s prior written consent, (j) use any trademarks, logos, service marks, trade names of Strapi, or any portion thereof, without Strapi’s prior written consent, (k) use the EE Software, or any portion thereof, in a manner that does not comply with applicable law, regulations, or governmental orders, or (l) use or store the EE Software on equipment not owned or controlled by Customer.
12
+
13
+ THE EE SOFTWARE IS PROVIDED ON AN “AS IS” BASIS WITHOUT ANY REPRESENTATIONS, WARRANTIES, COVENANTS, OR CONDITIONS OF ANY KIND (EXPRESS OR IMPLIED, STATUTORY OR OTHERWISE), INCLUDING, BUT NOT LIMITED TO, WARRANTIES OF MERCHANTABILITY, TITLE, FITNESS FOR A PARTICULAR PURPOSE, OR NONINFRINGEMENT. FURTHER, STRAPI DOES NOT REPRESENT OR WARRANT THAT (A) THE ACCESS TO OR USE OF THE EE SOFTWARE WILL BE SECURE, TIMELY, UNINTERRUPTED, ERROR-FREE, OR OPERATE IN COMBINATION WITH ANY OTHER HARDWARE, SOFTWARE, SYSTEM, OR DATA, (B) THE EE SOFTWARE WILL MEET YOUR REQUIREMENTS OR EXPECTATIONS, OR OTHERWISE PRODUCE ANY PARTICULAR RESULTS, (C) ERRORS OR DEFECTS WILL BE CORRECTED, PATCHES OR WORKAROUNDS WILL BE PROVIDED, OR STRAPI WILL DETECT ANY BUG IN THE EE SOFTWARE, (D) THE SOFTWARE IS FREE OF VIRUSES OR OTHER HARMFUL COMPONENTS, OR (E) THIRD-PARTY DISRUPTIONS OR SECURITY BREACHES OF THE EE SOFTWARE WILL BE PREVENTED.
14
+
15
+ STRAPI WILL NOT BE LIABLE FOR ANY LOSS OF PROFITS OR ANY INDIRECT, SPECIAL, INCIDENTAL, RELIANCE, OR CONSEQUENTIAL DAMAGES OF ANY KIND, REGARDLESS OF THE FORM OF ACTION, WHETHER IN CONTRACT, TORT (INCLUDING NEGLIGENCE), STRICT LIABILITY, OR OTHERWISE, EVEN IF INFORMED OF THE POSSIBILITY OF SUCH DAMAGES IN ADVANCE.
16
+
17
+ STRAPI’S ENTIRE LIABILITY TO YOU FOR USE OF THE EE SOFTWARE WILL NOT EXCEED $100.
18
+
19
+ 3. You are not granted any other rights beyond what is expressly stated herein and in the Enterprise Agreement or Subscription Agreement, as applicable.
20
+
21
+ 4. This EE Supplemental License does not apply to Strapi software that is distributed as part of the Strapi Community Edition (CE) (the “CE Software”).
@@ -0,0 +1,31 @@
1
+ /* eslint-disable jsx-a11y/click-events-have-key-events */
2
+ import React from 'react';
3
+ import styled from 'styled-components';
4
+ import { Flex, Text } from '@buffetjs/core';
5
+
6
+ export const ProviderButtonWrapper = styled(props => <Flex {...props} />)`
7
+ width: 11rem;
8
+ height: 4.5rem;
9
+ padding: 0.5rem;
10
+ border-radius: ${({ theme }) => theme.main.sizes.borderRadius};
11
+ border: 1px solid ${({ theme }) => theme.main.colors.border};
12
+ cursor: pointer;
13
+ &:hover {
14
+ ${Text} {
15
+ color: ${({ theme }) => theme.main.colors.mediumBlue};
16
+ }
17
+ svg > path {
18
+ fill: ${({ theme }) => theme.main.colors.mediumBlue};
19
+ }
20
+ border: 1px solid ${({ theme }) => theme.main.colors.darkBlue};
21
+ background-color: ${({ theme }) => theme.main.colors.lightestBlue};
22
+ }
23
+ `;
24
+
25
+ export const ProviderLink = styled.a`
26
+ text-decoration: none;
27
+
28
+ &:hover {
29
+ text-decoration: none;
30
+ }
31
+ `;
@@ -0,0 +1,42 @@
1
+ import React from 'react';
2
+ import PropTypes from 'prop-types';
3
+ import { Text } from '@buffetjs/core';
4
+ import { Tooltip } from '@buffetjs/styles';
5
+ import { ProviderButtonWrapper, ProviderLink } from './ProviderButtonStyles';
6
+
7
+ const ProviderButton = ({ provider }) => {
8
+ return (
9
+ <>
10
+ <ProviderLink
11
+ href={`${strapi.backendURL}/admin/connect/${provider.uid}`}
12
+ data-for={provider.uid}
13
+ data-tip={provider.displayName}
14
+ >
15
+ <ProviderButtonWrapper justifyContent="center" alignItems="center">
16
+ {provider.icon ? (
17
+ <img
18
+ src={provider.icon}
19
+ alt={provider.displayName}
20
+ style={{ maxWidth: '100%', maxHeight: 30 }}
21
+ />
22
+ ) : (
23
+ <Text color="black" ellipsis>
24
+ {provider.displayName}
25
+ </Text>
26
+ )}
27
+ </ProviderButtonWrapper>
28
+ </ProviderLink>
29
+ <Tooltip id={provider.uid} />
30
+ </>
31
+ );
32
+ };
33
+
34
+ ProviderButton.propTypes = {
35
+ provider: PropTypes.exact({
36
+ displayName: PropTypes.string,
37
+ icon: PropTypes.string,
38
+ uid: PropTypes.string,
39
+ }).isRequired,
40
+ };
41
+
42
+ export default ProviderButton;
@@ -0,0 +1,3 @@
1
+ const IS_DISABLED = false;
2
+
3
+ export default IS_DISABLED;
@@ -0,0 +1,3 @@
1
+ const IS_DISABLED = false;
2
+
3
+ export default IS_DISABLED;
@@ -0,0 +1,3 @@
1
+ const IS_DISABLED = false;
2
+
3
+ export default IS_DISABLED;
@@ -0,0 +1,3 @@
1
+ const IS_DISABLED = false;
2
+
3
+ export default IS_DISABLED;
@@ -0,0 +1,3 @@
1
+ const IS_DISABLED = false;
2
+
3
+ export default IS_DISABLED;