@ozdao/martyrs 0.2.472 → 0.2.474
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.
- package/dist/{Media-DW8RLbfM.js → Media-_vz04tII.js} +1 -1
- package/dist/{Media-y_TX6us_.mjs → Media-sGk7Bp9b.mjs} +1 -1
- package/dist/_virtual/index.cjs +1 -1
- package/dist/_virtual/index.js +1 -1
- package/dist/auth.server.js +6 -2
- package/dist/auth.server.mjs +6 -2
- package/dist/authJwt-CELQKF2s.js +82 -0
- package/dist/authJwt-DnXu3BFq.mjs +83 -0
- package/dist/builder.js +7 -4
- package/dist/builder.mjs +7 -4
- package/dist/chats.server.js +1 -1
- package/dist/chats.server.mjs +1 -1
- package/dist/community.server.js +4 -4
- package/dist/community.server.mjs +4 -4
- package/dist/events.server.js +4 -4
- package/dist/events.server.mjs +4 -4
- package/dist/files.server.js +1 -1
- package/dist/files.server.mjs +1 -1
- package/dist/gallery.server.js +3 -3
- package/dist/gallery.server.mjs +3 -3
- package/dist/{globals.abac-DT0VjfaZ.js → globals.abac-Bn-4tbX8.js} +110 -16
- package/dist/{globals.abac-CvmZM8XG.mjs → globals.abac-DZpTRxKR.mjs} +110 -16
- package/dist/globals.server.js +70 -10
- package/dist/globals.server.mjs +70 -10
- package/dist/{globals.verifier-C_VZYebB.mjs → globals.verifier-BdJxc8-8.mjs} +34 -0
- package/dist/{globals.verifier-ChDpCdy_.js → globals.verifier-CKYpYfQl.js} +34 -0
- package/dist/{index-CVXl1rB5.js → index-BOmxJQ5W.js} +7 -86
- package/dist/{index-Df8vtZx7.mjs → index-C_Fw0Umg.mjs} +7 -86
- package/dist/{main-CgmHzhq5.mjs → main-CqMtW7Hq.mjs} +274 -276
- package/dist/{main-CCfQH-Dd.js → main-CsGkbSyK.js} +2 -2
- package/dist/martyrs/src/components/Button/{Button.vue.cjs → Button.vue2.cjs} +2 -2
- package/dist/martyrs/src/components/Button/Button.vue2.cjs.map +1 -0
- package/dist/martyrs/src/components/Button/{Button.vue.js → Button.vue2.js} +2 -2
- package/dist/martyrs/src/components/Button/{Button.vue.cjs.map → Button.vue2.js.map} +1 -1
- package/dist/martyrs/src/components/Dropdown/{Dropdown.vue2.cjs → Dropdown.vue.cjs} +2 -2
- package/dist/martyrs/src/components/Dropdown/{Dropdown.vue2.js.map → Dropdown.vue.cjs.map} +1 -1
- package/dist/martyrs/src/components/Dropdown/{Dropdown.vue2.js → Dropdown.vue.js} +2 -2
- package/dist/martyrs/src/components/Dropdown/Dropdown.vue.js.map +1 -0
- package/dist/martyrs/src/components/Feed/Feed.vue.cjs +1 -1
- package/dist/martyrs/src/components/Feed/Feed.vue.js +1 -1
- package/dist/martyrs/src/components/Menu/{Menu.vue2.cjs → Menu.vue.cjs} +2 -2
- package/dist/martyrs/src/components/Menu/Menu.vue.cjs.map +1 -0
- package/dist/martyrs/src/components/Menu/{Menu.vue2.js → Menu.vue.js} +2 -2
- package/dist/martyrs/src/components/Menu/Menu.vue.js.map +1 -0
- package/dist/martyrs/src/components/Select/Select.vue.cjs +4 -4
- package/dist/martyrs/src/components/Select/Select.vue.cjs.map +1 -1
- package/dist/martyrs/src/components/Select/Select.vue.js +4 -4
- package/dist/martyrs/src/components/Select/Select.vue.js.map +1 -1
- package/dist/martyrs/src/components/Tab/{Tab.vue.cjs → Tab.vue2.cjs} +2 -2
- package/dist/martyrs/src/components/Tab/Tab.vue2.cjs.map +1 -0
- package/dist/martyrs/src/components/Tab/{Tab.vue.js → Tab.vue2.js} +2 -2
- package/dist/martyrs/src/components/Tab/{Tab.vue.cjs.map → Tab.vue2.js.map} +1 -1
- package/dist/martyrs/src/modules/auth/views/components/layouts/Auth.vue.cjs +2 -2
- package/dist/martyrs/src/modules/auth/views/components/layouts/Auth.vue.js +2 -2
- package/dist/martyrs/src/modules/auth/views/components/pages/EnterPassword.vue.cjs +2 -2
- package/dist/martyrs/src/modules/auth/views/components/pages/EnterPassword.vue.js +2 -2
- package/dist/martyrs/src/modules/auth/views/components/pages/Invite.vue.cjs +2 -2
- package/dist/martyrs/src/modules/auth/views/components/pages/Invite.vue.js +2 -2
- package/dist/martyrs/src/modules/auth/views/components/pages/Profile.vue.cjs +3 -3
- package/dist/martyrs/src/modules/auth/views/components/pages/Profile.vue.js +3 -3
- package/dist/martyrs/src/modules/auth/views/components/pages/ProfileBlogposts.vue.cjs +1 -1
- package/dist/martyrs/src/modules/auth/views/components/pages/ProfileBlogposts.vue.js +1 -1
- package/dist/martyrs/src/modules/auth/views/components/pages/ProfileEdit.vue.cjs +2 -2
- package/dist/martyrs/src/modules/auth/views/components/pages/ProfileEdit.vue.js +2 -2
- package/dist/martyrs/src/modules/auth/views/components/pages/ResetPassword.vue.cjs +2 -2
- package/dist/martyrs/src/modules/auth/views/components/pages/ResetPassword.vue.js +2 -2
- package/dist/martyrs/src/modules/auth/views/components/pages/SignIn.vue.cjs +2 -2
- package/dist/martyrs/src/modules/auth/views/components/pages/SignIn.vue.js +2 -2
- package/dist/martyrs/src/modules/auth/views/components/pages/SignUp.vue.cjs +2 -2
- package/dist/martyrs/src/modules/auth/views/components/pages/SignUp.vue.js +2 -2
- package/dist/martyrs/src/modules/auth/views/components/sections/ProfileEditCredentials.vue.cjs +1 -1
- package/dist/martyrs/src/modules/auth/views/components/sections/ProfileEditCredentials.vue.js +1 -1
- package/dist/martyrs/src/modules/community/community.client.js +27 -27
- package/dist/martyrs/src/modules/community/community.client.js.map +1 -1
- package/dist/martyrs/src/modules/community/components/pages/BlogPost.vue.cjs +1 -1
- package/dist/martyrs/src/modules/community/components/pages/BlogPost.vue.js +1 -1
- package/dist/martyrs/src/modules/community/components/pages/CreateBlogPost.vue.cjs +1 -1
- package/dist/martyrs/src/modules/community/components/pages/CreateBlogPost.vue.js +1 -1
- package/dist/martyrs/src/modules/community/components/sections/HotPosts.vue.cjs +3 -4
- package/dist/martyrs/src/modules/community/components/sections/HotPosts.vue.cjs.map +1 -1
- package/dist/martyrs/src/modules/community/components/sections/HotPosts.vue.js +3 -4
- package/dist/martyrs/src/modules/community/components/sections/HotPosts.vue.js.map +1 -1
- package/dist/martyrs/src/modules/constructor/components/sections/Constructor.vue.cjs +1 -1
- package/dist/martyrs/src/modules/constructor/components/sections/Constructor.vue.js +1 -1
- package/dist/martyrs/src/modules/events/components/elements/ButtonCheck.vue.cjs +1 -1
- package/dist/martyrs/src/modules/events/components/elements/ButtonCheck.vue.js +1 -1
- package/dist/martyrs/src/modules/events/components/elements/ButtonJoin.vue.cjs +1 -1
- package/dist/martyrs/src/modules/events/components/elements/ButtonJoin.vue.js +1 -1
- package/dist/martyrs/src/modules/events/components/pages/EditEvent.vue.cjs +1 -1
- package/dist/martyrs/src/modules/events/components/pages/EditEvent.vue.js +1 -1
- package/dist/martyrs/src/modules/events/components/pages/EditEventTickets.vue.cjs +1 -1
- package/dist/martyrs/src/modules/events/components/pages/EditEventTickets.vue.js +1 -1
- package/dist/martyrs/src/modules/events/components/pages/EventsBackoffice.vue.cjs +1 -1
- package/dist/martyrs/src/modules/events/components/pages/EventsBackoffice.vue.js +1 -1
- package/dist/martyrs/src/modules/events/components/sections/EventsHot.vue.cjs +1 -1
- package/dist/martyrs/src/modules/events/components/sections/EventsHot.vue.js +1 -1
- package/dist/martyrs/src/modules/gallery/components/sections/BackofficeGallery.vue.cjs +1 -1
- package/dist/martyrs/src/modules/gallery/components/sections/BackofficeGallery.vue.js +1 -1
- package/dist/martyrs/src/modules/globals/globals.client.cjs +2 -0
- package/dist/martyrs/src/modules/globals/globals.client.cjs.map +1 -1
- package/dist/martyrs/src/modules/globals/globals.client.js +3 -1
- package/dist/martyrs/src/modules/globals/globals.client.js.map +1 -1
- package/dist/martyrs/src/modules/globals/views/components/blocks/CardHeader.vue.cjs +2 -2
- package/dist/martyrs/src/modules/globals/views/components/blocks/CardHeader.vue.js +2 -2
- package/dist/martyrs/src/modules/globals/views/components/blocks/PopupDateSelector.vue.cjs +1 -1
- package/dist/martyrs/src/modules/globals/views/components/blocks/PopupDateSelector.vue.js +1 -1
- package/dist/martyrs/src/modules/globals/views/components/layouts/Client.vue.cjs +1 -1
- package/dist/martyrs/src/modules/globals/views/components/layouts/Client.vue.js +1 -1
- package/dist/martyrs/src/modules/globals/views/components/partials/Header.vue.cjs +1 -1
- package/dist/martyrs/src/modules/globals/views/components/partials/Header.vue.js +1 -1
- package/dist/martyrs/src/modules/globals/views/components/partials/Navigation.vue.cjs +1 -1
- package/dist/martyrs/src/modules/globals/views/components/partials/Navigation.vue.js +1 -1
- package/dist/martyrs/src/modules/globals/views/components/partials/NavigationBar.vue.cjs +1 -1
- package/dist/martyrs/src/modules/globals/views/components/partials/NavigationBar.vue.js +1 -1
- package/dist/martyrs/src/modules/globals/views/components/sections/SectionPageTitle.vue.cjs +1 -1
- package/dist/martyrs/src/modules/globals/views/components/sections/SectionPageTitle.vue.js +1 -1
- package/dist/martyrs/src/modules/globals/views/utils/vue-app-renderer.cjs +1 -1
- package/dist/martyrs/src/modules/globals/views/utils/vue-app-renderer.js +1 -1
- package/dist/martyrs/src/modules/orders/components/pages/OrderBackoffice.vue.cjs +1 -1
- package/dist/martyrs/src/modules/orders/components/pages/OrderBackoffice.vue.js +1 -1
- package/dist/martyrs/src/modules/orders/components/pages/OrderCreate.vue.cjs +89 -28
- package/dist/martyrs/src/modules/orders/components/pages/OrderCreate.vue.cjs.map +1 -1
- package/dist/martyrs/src/modules/orders/components/pages/OrderCreate.vue.js +90 -29
- package/dist/martyrs/src/modules/orders/components/pages/OrderCreate.vue.js.map +1 -1
- package/dist/martyrs/src/modules/orders/components/pages/OrderCreateBackoffice.vue.cjs +2 -2
- package/dist/martyrs/src/modules/orders/components/pages/OrderCreateBackoffice.vue.js +2 -2
- package/dist/martyrs/src/modules/orders/components/pages/Orders.vue.cjs +1 -1
- package/dist/martyrs/src/modules/orders/components/pages/Orders.vue.js +1 -1
- package/dist/martyrs/src/modules/orders/components/sections/FormAddCustomer.vue.cjs +1 -1
- package/dist/martyrs/src/modules/orders/components/sections/FormAddCustomer.vue.js +1 -1
- package/dist/martyrs/src/modules/orders/components/sections/FormDelivery.vue.cjs +1 -1
- package/dist/martyrs/src/modules/orders/components/sections/FormDelivery.vue.js +1 -1
- package/dist/martyrs/src/modules/orders/store/shopcart.cjs +1 -0
- package/dist/martyrs/src/modules/orders/store/shopcart.cjs.map +1 -1
- package/dist/martyrs/src/modules/orders/store/shopcart.js +1 -0
- package/dist/martyrs/src/modules/orders/store/shopcart.js.map +1 -1
- package/dist/martyrs/src/modules/organizations/components/elements/ButtonToggleMembership.vue.cjs +1 -1
- package/dist/martyrs/src/modules/organizations/components/elements/ButtonToggleMembership.vue.js +1 -1
- package/dist/martyrs/src/modules/organizations/components/pages/DepartmentEdit.vue.cjs +2 -2
- package/dist/martyrs/src/modules/organizations/components/pages/DepartmentEdit.vue.js +2 -2
- package/dist/martyrs/src/modules/organizations/components/pages/Members.vue.cjs +2 -2
- package/dist/martyrs/src/modules/organizations/components/pages/Members.vue.js +2 -2
- package/dist/martyrs/src/modules/organizations/components/pages/Organization.vue.cjs +2 -2
- package/dist/martyrs/src/modules/organizations/components/pages/Organization.vue.js +2 -2
- package/dist/martyrs/src/modules/organizations/components/pages/OrganizationBackoffice.vue.cjs +1 -1
- package/dist/martyrs/src/modules/organizations/components/pages/OrganizationBackoffice.vue.js +1 -1
- package/dist/martyrs/src/modules/organizations/components/pages/OrganizationEdit.vue.cjs +2 -2
- package/dist/martyrs/src/modules/organizations/components/pages/OrganizationEdit.vue.js +2 -2
- package/dist/martyrs/src/modules/organizations/components/pages/Organizations.vue.cjs +1 -1
- package/dist/martyrs/src/modules/organizations/components/pages/Organizations.vue.js +1 -1
- package/dist/martyrs/src/modules/organizations/components/sections/DetailsTabSection.vue.cjs +1 -1
- package/dist/martyrs/src/modules/organizations/components/sections/DetailsTabSection.vue.js +1 -1
- package/dist/martyrs/src/modules/organizations/components/sections/Documents.vue.cjs +1 -1
- package/dist/martyrs/src/modules/organizations/components/sections/Documents.vue.js +1 -1
- package/dist/martyrs/src/modules/organizations/components/sections/MembersAdd.vue.cjs +1 -1
- package/dist/martyrs/src/modules/organizations/components/sections/MembersAdd.vue.js +1 -1
- package/dist/martyrs/src/modules/organizations/components/sections/Organizations.vue.cjs +2 -2
- package/dist/martyrs/src/modules/organizations/components/sections/Organizations.vue.js +2 -2
- package/dist/martyrs/src/modules/pages/views/components/blocks/CardPage.vue.cjs +1 -1
- package/dist/martyrs/src/modules/pages/views/components/blocks/CardPage.vue.js +1 -1
- package/dist/martyrs/src/modules/pages/views/components/pages/PageEdit.vue.cjs +1 -1
- package/dist/martyrs/src/modules/pages/views/components/pages/PageEdit.vue.js +1 -1
- package/dist/martyrs/src/modules/pages/views/components/partials/SidebarPages.vue.cjs +1 -1
- package/dist/martyrs/src/modules/pages/views/components/partials/SidebarPages.vue.js +1 -1
- package/dist/martyrs/src/modules/products/components/pages/Categories.vue.cjs +1 -1
- package/dist/martyrs/src/modules/products/components/pages/Categories.vue.js +1 -1
- package/dist/martyrs/src/modules/products/components/pages/CategoryEdit.vue.cjs +21 -2
- package/dist/martyrs/src/modules/products/components/pages/CategoryEdit.vue.cjs.map +1 -1
- package/dist/martyrs/src/modules/products/components/pages/CategoryEdit.vue.js +21 -2
- package/dist/martyrs/src/modules/products/components/pages/CategoryEdit.vue.js.map +1 -1
- package/dist/martyrs/src/modules/products/components/pages/Leftovers.vue.cjs +1 -1
- package/dist/martyrs/src/modules/products/components/pages/Leftovers.vue.js +1 -1
- package/dist/martyrs/src/modules/products/components/pages/Product.vue.cjs +3 -2
- package/dist/martyrs/src/modules/products/components/pages/Product.vue.cjs.map +1 -1
- package/dist/martyrs/src/modules/products/components/pages/Product.vue.js +3 -2
- package/dist/martyrs/src/modules/products/components/pages/Product.vue.js.map +1 -1
- package/dist/martyrs/src/modules/products/components/pages/ProductEdit.vue.cjs +4 -4
- package/dist/martyrs/src/modules/products/components/pages/ProductEdit.vue.cjs.map +1 -1
- package/dist/martyrs/src/modules/products/components/pages/ProductEdit.vue.js +4 -4
- package/dist/martyrs/src/modules/products/components/pages/ProductEdit.vue.js.map +1 -1
- package/dist/martyrs/src/modules/products/components/pages/Products.vue.cjs +1 -1
- package/dist/martyrs/src/modules/products/components/pages/Products.vue.js +1 -1
- package/dist/martyrs/src/modules/products/components/sections/EditProductInfo.vue.cjs +1 -1
- package/dist/martyrs/src/modules/products/components/sections/EditProductInfo.vue.js +1 -1
- package/dist/martyrs/src/modules/products/components/sections/SectionProduct.vue.cjs +2 -2
- package/dist/martyrs/src/modules/products/components/sections/SectionProduct.vue.js +2 -2
- package/dist/martyrs/src/modules/products/store/categories.cjs +2 -0
- package/dist/martyrs/src/modules/products/store/categories.cjs.map +1 -1
- package/dist/martyrs/src/modules/products/store/categories.js +2 -0
- package/dist/martyrs/src/modules/products/store/categories.js.map +1 -1
- package/dist/martyrs/src/modules/rents/views/components/pages/GanttChart.vue.cjs +1 -1
- package/dist/martyrs/src/modules/rents/views/components/pages/GanttChart.vue.js +1 -1
- package/dist/martyrs/src/modules/rents/views/components/pages/Rents.vue.cjs +1 -1
- package/dist/martyrs/src/modules/rents/views/components/pages/Rents.vue.js +1 -1
- package/dist/martyrs/src/modules/reports/components/sections/FormReport.vue.cjs +1 -1
- package/dist/martyrs/src/modules/reports/components/sections/FormReport.vue.js +1 -1
- package/dist/martyrs/src/modules/spots/components/layouts/Spots.vue.cjs +1 -1
- package/dist/martyrs/src/modules/spots/components/layouts/Spots.vue.js +1 -1
- package/dist/martyrs/src/modules/spots/components/pages/Map.vue.cjs +1 -1
- package/dist/martyrs/src/modules/spots/components/pages/Map.vue.js +1 -1
- package/dist/martyrs/src/modules/spots/components/pages/SpotEdit.vue.cjs +32 -26
- package/dist/martyrs/src/modules/spots/components/pages/SpotEdit.vue.cjs.map +1 -1
- package/dist/martyrs/src/modules/spots/components/pages/SpotEdit.vue.js +32 -26
- package/dist/martyrs/src/modules/spots/components/pages/SpotEdit.vue.js.map +1 -1
- package/dist/martyrs/src/modules/spots/components/sections/WorktimeEdit.vue.cjs +807 -0
- package/dist/martyrs/src/modules/spots/components/sections/WorktimeEdit.vue.cjs.map +1 -0
- package/dist/martyrs/src/modules/spots/components/sections/WorktimeEdit.vue.js +807 -0
- package/dist/martyrs/src/modules/spots/components/sections/WorktimeEdit.vue.js.map +1 -0
- package/dist/martyrs/src/modules/spots/store/spots.cjs +4 -1
- package/dist/martyrs/src/modules/spots/store/spots.cjs.map +1 -1
- package/dist/martyrs/src/modules/spots/store/spots.js +4 -1
- package/dist/martyrs/src/modules/spots/store/spots.js.map +1 -1
- package/dist/martyrs.cjs.js +1 -1
- package/dist/martyrs.css +1 -1
- package/dist/martyrs.es.js +1 -1
- package/dist/{martyrs → node_modules/.pnpm/@vue_server-renderer@3.5.13_vue@3.5.13_typescript@5.8.3_}/node_modules/@vue/server-renderer/dist/server-renderer.esm-bundler.cjs +1 -1
- package/dist/node_modules/.pnpm/@vue_server-renderer@3.5.13_vue@3.5.13_typescript@5.8.3_/node_modules/@vue/server-renderer/dist/server-renderer.esm-bundler.cjs.map +1 -0
- package/dist/{martyrs → node_modules/.pnpm/@vue_server-renderer@3.5.13_vue@3.5.13_typescript@5.8.3_}/node_modules/@vue/server-renderer/dist/server-renderer.esm-bundler.js +1 -1
- package/dist/node_modules/.pnpm/@vue_server-renderer@3.5.13_vue@3.5.13_typescript@5.8.3_/node_modules/@vue/server-renderer/dist/server-renderer.esm-bundler.js.map +1 -0
- package/dist/node_modules/.pnpm/@vue_shared@3.5.13/node_modules/@vue/shared/dist/shared.esm-bundler.cjs.map +1 -0
- package/dist/node_modules/.pnpm/@vue_shared@3.5.13/node_modules/@vue/shared/dist/shared.esm-bundler.js.map +1 -0
- package/dist/node_modules/.pnpm/uuid@11.1.0/node_modules/uuid/dist/esm-browser/native.cjs +6 -0
- package/dist/node_modules/.pnpm/uuid@11.1.0/node_modules/uuid/dist/esm-browser/native.cjs.map +1 -0
- package/dist/node_modules/.pnpm/uuid@11.1.0/node_modules/uuid/dist/esm-browser/native.js +6 -0
- package/dist/node_modules/.pnpm/uuid@11.1.0/node_modules/uuid/dist/esm-browser/native.js.map +1 -0
- package/dist/{martyrs → node_modules/.pnpm/uuid@11.1.0}/node_modules/uuid/dist/esm-browser/rng.cjs +4 -4
- package/dist/node_modules/.pnpm/uuid@11.1.0/node_modules/uuid/dist/esm-browser/rng.cjs.map +1 -0
- package/dist/node_modules/.pnpm/uuid@11.1.0/node_modules/uuid/dist/esm-browser/rng.js +15 -0
- package/dist/node_modules/.pnpm/uuid@11.1.0/node_modules/uuid/dist/esm-browser/rng.js.map +1 -0
- package/dist/node_modules/.pnpm/uuid@11.1.0/node_modules/uuid/dist/esm-browser/stringify.cjs +11 -0
- package/dist/node_modules/.pnpm/uuid@11.1.0/node_modules/uuid/dist/esm-browser/stringify.cjs.map +1 -0
- package/dist/node_modules/.pnpm/uuid@11.1.0/node_modules/uuid/dist/esm-browser/stringify.js +11 -0
- package/dist/node_modules/.pnpm/uuid@11.1.0/node_modules/uuid/dist/esm-browser/stringify.js.map +1 -0
- package/dist/node_modules/.pnpm/uuid@11.1.0/node_modules/uuid/dist/esm-browser/v4.cjs +21 -0
- package/dist/node_modules/.pnpm/uuid@11.1.0/node_modules/uuid/dist/esm-browser/v4.cjs.map +1 -0
- package/dist/node_modules/.pnpm/uuid@11.1.0/node_modules/uuid/dist/esm-browser/v4.js +21 -0
- package/dist/node_modules/.pnpm/uuid@11.1.0/node_modules/uuid/dist/esm-browser/v4.js.map +1 -0
- package/dist/notifications.server.js +1 -1
- package/dist/notifications.server.mjs +1 -1
- package/dist/orders.server.js +5 -4
- package/dist/orders.server.mjs +5 -4
- package/dist/organizations.server.js +120 -47
- package/dist/organizations.server.mjs +120 -47
- package/dist/{ownership.schema-C0w02Vw1.mjs → ownership.schema-CNCotD3D.mjs} +10 -4
- package/dist/{ownership.schema-Ck2H9clB.js → ownership.schema-MxfJlPtq.js} +10 -4
- package/dist/products.server.js +415 -149
- package/dist/products.server.mjs +415 -149
- package/dist/{profile.schema-h61hhB2w.js → profile.schema-BLSuV_VC.js} +0 -4
- package/dist/{profile.schema-kP_zKXNt.mjs → profile.schema-BRuvQ7QV.mjs} +0 -4
- package/dist/{queryProcessor-CWnMIe2U.mjs → queryProcessor-CVKI651_.mjs} +62 -8
- package/dist/{queryProcessor-D6GuKfTV.js → queryProcessor-DSUqSk3I.js} +62 -8
- package/dist/rents.server.js +4 -4
- package/dist/rents.server.mjs +4 -4
- package/dist/spots.server.js +162 -8
- package/dist/spots.server.mjs +162 -8
- package/dist/style.css +27 -4
- package/dist/wallet.server.js +2 -2
- package/dist/wallet.server.mjs +2 -2
- package/package.json +1 -1
- package/src/builder/rspack/rspack.config.base.js +1 -1
- package/src/builder/rspack/rspack.config.client.js +13 -5
- package/src/components/Select/Select.vue +4 -2
- package/src/modules/auth/models/user.model.js +4 -1
- package/src/modules/community/components/sections/HotPosts.vue +1 -1
- package/src/modules/globals/controllers/classes/globals.abac.js +148 -23
- package/src/modules/globals/controllers/classes/globals.validator.js +37 -0
- package/src/modules/globals/controllers/classes/globals.verifier.js +2 -0
- package/src/modules/globals/controllers/policies/globals.policies.js +91 -74
- package/src/modules/globals/controllers/utils/queryProcessor.js +59 -11
- package/src/modules/globals/globals.client.js +3 -0
- package/src/modules/globals/models/schemas/ownership.schema.js +11 -6
- package/src/modules/globals/models/schemas/profile.schema.js +0 -4
- package/src/modules/music/components/layouts/MusicLayout.vue +10 -58
- package/src/modules/music/components/pages/MusicHome.vue +5 -5
- package/src/modules/orders/components/pages/OrderCreate.vue +85 -12
- package/src/modules/orders/controllers/orders.controller.js +3 -0
- package/src/modules/orders/store/shopcart.js +1 -0
- package/src/modules/organizations/models/schemas/accesses.schema.js +18 -0
- package/src/modules/organizations/policies/organizations.policies.js +117 -61
- package/src/modules/products/components/pages/CategoryEdit.vue +27 -2
- package/src/modules/products/components/pages/Product.vue +1 -0
- package/src/modules/products/components/pages/ProductEdit.vue +2 -2
- package/src/modules/products/controllers/categories.controller.js +297 -133
- package/src/modules/products/middlewares/categories.verifier.js +177 -0
- package/src/modules/products/models/category.model.js +12 -14
- package/src/modules/products/routes/categories.routes.js +50 -11
- package/src/modules/products/store/categories.js +2 -0
- package/src/modules/spots/components/pages/SpotEdit.vue +21 -17
- package/src/modules/spots/components/sections/WorktimeEdit.vue +840 -0
- package/src/modules/spots/controllers/queries/getIsOpenNowStage.js +109 -0
- package/src/modules/spots/controllers/spots.controller.js +2 -1
- package/src/modules/spots/models/spot.model.js +59 -13
- package/src/modules/spots/store/spots.js +4 -1
- package/dist/martyrs/node_modules/@vue/server-renderer/dist/server-renderer.esm-bundler.cjs.map +0 -1
- package/dist/martyrs/node_modules/@vue/server-renderer/dist/server-renderer.esm-bundler.js.map +0 -1
- package/dist/martyrs/node_modules/@vue/shared/dist/shared.esm-bundler.cjs.map +0 -1
- package/dist/martyrs/node_modules/@vue/shared/dist/shared.esm-bundler.js.map +0 -1
- package/dist/martyrs/node_modules/uuid/dist/esm-browser/regex.cjs +0 -5
- package/dist/martyrs/node_modules/uuid/dist/esm-browser/regex.cjs.map +0 -1
- package/dist/martyrs/node_modules/uuid/dist/esm-browser/regex.js +0 -5
- package/dist/martyrs/node_modules/uuid/dist/esm-browser/regex.js.map +0 -1
- package/dist/martyrs/node_modules/uuid/dist/esm-browser/rng.cjs.map +0 -1
- package/dist/martyrs/node_modules/uuid/dist/esm-browser/rng.js +0 -15
- package/dist/martyrs/node_modules/uuid/dist/esm-browser/rng.js.map +0 -1
- package/dist/martyrs/node_modules/uuid/dist/esm-browser/stringify.cjs +0 -17
- package/dist/martyrs/node_modules/uuid/dist/esm-browser/stringify.cjs.map +0 -1
- package/dist/martyrs/node_modules/uuid/dist/esm-browser/stringify.js +0 -17
- package/dist/martyrs/node_modules/uuid/dist/esm-browser/stringify.js.map +0 -1
- package/dist/martyrs/node_modules/uuid/dist/esm-browser/v4.cjs +0 -13
- package/dist/martyrs/node_modules/uuid/dist/esm-browser/v4.cjs.map +0 -1
- package/dist/martyrs/node_modules/uuid/dist/esm-browser/v4.js +0 -13
- package/dist/martyrs/node_modules/uuid/dist/esm-browser/v4.js.map +0 -1
- package/dist/martyrs/node_modules/uuid/dist/esm-browser/validate.cjs +0 -8
- package/dist/martyrs/node_modules/uuid/dist/esm-browser/validate.cjs.map +0 -1
- package/dist/martyrs/node_modules/uuid/dist/esm-browser/validate.js +0 -8
- package/dist/martyrs/node_modules/uuid/dist/esm-browser/validate.js.map +0 -1
- package/dist/martyrs/src/components/Button/Button.vue.js.map +0 -1
- package/dist/martyrs/src/components/Dropdown/Dropdown.vue2.cjs.map +0 -1
- package/dist/martyrs/src/components/Menu/Menu.vue2.cjs.map +0 -1
- package/dist/martyrs/src/components/Menu/Menu.vue2.js.map +0 -1
- package/dist/martyrs/src/components/Tab/Tab.vue.js.map +0 -1
- package/src/modules/products/middlewares/index.js +0 -11
- package/src/modules/products/middlewares/verifyCategory.js +0 -25
- /package/dist/{martyrs → node_modules/.pnpm/@vue_shared@3.5.13}/node_modules/@vue/shared/dist/shared.esm-bundler.cjs +0 -0
- /package/dist/{martyrs → node_modules/.pnpm/@vue_shared@3.5.13}/node_modules/@vue/shared/dist/shared.esm-bundler.js +0 -0
- /package/dist/{martyrs/node_modules → node_modules}/fast-deep-equal/index.cjs +0 -0
- /package/dist/{martyrs/node_modules → node_modules}/fast-deep-equal/index.cjs.map +0 -0
- /package/dist/{martyrs/node_modules → node_modules}/fast-deep-equal/index.js +0 -0
- /package/dist/{martyrs/node_modules → node_modules}/fast-deep-equal/index.js.map +0 -0
package/dist/style.css
CHANGED
|
@@ -336,10 +336,10 @@ button[disabled] {
|
|
|
336
336
|
.color-overlay.active {
|
|
337
337
|
background: rgba(0, 0, 0, 0.25);
|
|
338
338
|
pointer-events: all;
|
|
339
|
-
}li[data-v-
|
|
339
|
+
}li[data-v-026b7d35] {
|
|
340
340
|
list-style-type: none;
|
|
341
341
|
}
|
|
342
|
-
ul li[data-v-
|
|
342
|
+
ul li[data-v-026b7d35] {
|
|
343
343
|
line-height: 2;
|
|
344
344
|
}.vue3-marquee {
|
|
345
345
|
display: flex !important;
|
|
@@ -993,11 +993,11 @@ div.vue-tags-input.disabled * {
|
|
|
993
993
|
.fade-leave-to[data-v-a766dedc] {
|
|
994
994
|
opacity: 0;
|
|
995
995
|
}
|
|
996
|
-
.slider-hotpost .carousel__slide
|
|
996
|
+
.slider-hotpost .carousel__slide {
|
|
997
997
|
flex: 0 0 25%;
|
|
998
998
|
}
|
|
999
999
|
@media screen and (max-width: 1025px) {
|
|
1000
|
-
.slider-hotpost .carousel__slide
|
|
1000
|
+
.slider-hotpost .carousel__slide {
|
|
1001
1001
|
flex: 0 0 75%;
|
|
1002
1002
|
}
|
|
1003
1003
|
}.error-wrapper {
|
|
@@ -2521,6 +2521,29 @@ to {
|
|
|
2521
2521
|
border: 1px solid rgba(0, 0, 0, 0.1);
|
|
2522
2522
|
margin-top: 1rem;
|
|
2523
2523
|
}
|
|
2524
|
+
|
|
2525
|
+
.working-hours-editor[data-v-f62ccd5d] {
|
|
2526
|
+
border-radius: 8px;
|
|
2527
|
+
}
|
|
2528
|
+
.schedule-item[data-v-f62ccd5d] {
|
|
2529
|
+
transition: all 0.3s ease;
|
|
2530
|
+
border-bottom: 1px solid rgba(var(--grey), 0.1);
|
|
2531
|
+
}
|
|
2532
|
+
.schedule-item[data-v-f62ccd5d]:last-child {
|
|
2533
|
+
border-bottom: none;
|
|
2534
|
+
}
|
|
2535
|
+
.period[data-v-f62ccd5d] {
|
|
2536
|
+
display: inline-block;
|
|
2537
|
+
}
|
|
2538
|
+
.empty-schedule[data-v-f62ccd5d] {
|
|
2539
|
+
color: rgba(var(--dark), 0.6);
|
|
2540
|
+
}
|
|
2541
|
+
.period-row[data-v-f62ccd5d] {
|
|
2542
|
+
align-items: center;
|
|
2543
|
+
}
|
|
2544
|
+
.error-message[data-v-f62ccd5d] {
|
|
2545
|
+
color: white;
|
|
2546
|
+
}
|
|
2524
2547
|
#map[data-v-aa4fd3e0]:focus {
|
|
2525
2548
|
outline: none;
|
|
2526
2549
|
}
|
package/dist/wallet.server.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
const _commonjsHelpers = require("./_commonjsHelpers-DHfMLFPC.js");
|
|
3
|
-
const index = require("./index-
|
|
3
|
+
const index = require("./index-BOmxJQ5W.js");
|
|
4
4
|
require("axios");
|
|
5
5
|
require("bcryptjs");
|
|
6
6
|
require("crypto");
|
|
@@ -9,7 +9,7 @@ const tickets_controller = require("./tickets.controller-zEHIAe_B.js");
|
|
|
9
9
|
const require$$0 = require("stripe");
|
|
10
10
|
const require$$0$1 = require("mongoose");
|
|
11
11
|
const require$$1 = require("bignumber.js");
|
|
12
|
-
const queryProcessor = require("./queryProcessor-
|
|
12
|
+
const queryProcessor = require("./queryProcessor-DSUqSk3I.js");
|
|
13
13
|
var wallet_model;
|
|
14
14
|
var hasRequiredWallet_model;
|
|
15
15
|
function requireWallet_model() {
|
package/dist/wallet.server.mjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { g as getDefaultExportFromCjs } from "./_commonjsHelpers-CUmg6egw.mjs";
|
|
2
|
-
import { r as requireMiddlewares } from "./index-
|
|
2
|
+
import { r as requireMiddlewares } from "./index-C_Fw0Umg.mjs";
|
|
3
3
|
import "axios";
|
|
4
4
|
import "bcryptjs";
|
|
5
5
|
import "crypto";
|
|
@@ -8,7 +8,7 @@ import { r as requireTickets_controller } from "./tickets.controller-BIhfgjNb.mj
|
|
|
8
8
|
import require$$0 from "stripe";
|
|
9
9
|
import require$$0$1 from "mongoose";
|
|
10
10
|
import require$$1 from "bignumber.js";
|
|
11
|
-
import { r as requireQueryProcessor } from "./queryProcessor-
|
|
11
|
+
import { r as requireQueryProcessor } from "./queryProcessor-CVKI651_.mjs";
|
|
12
12
|
var wallet_model;
|
|
13
13
|
var hasRequiredWallet_model;
|
|
14
14
|
function requireWallet_model() {
|
package/package.json
CHANGED
|
@@ -88,7 +88,7 @@ module.exports = (projectRoot) => {
|
|
|
88
88
|
plugins: [
|
|
89
89
|
...(process.env.BUNDLE_ANALYZER ? [new RsdoctorRspackPlugin(), new BundleAnalyzerPlugin()] : []),
|
|
90
90
|
new VueLoaderPlugin(),
|
|
91
|
-
...(process.env.
|
|
91
|
+
...(process.env.NODE_ENV === 'production' ? [new rspack.CssExtractRspackPlugin({
|
|
92
92
|
filename: '[name].[contenthash].css',
|
|
93
93
|
chunkFilename: '[id].[contenthash].css',
|
|
94
94
|
ignoreOrder: true,
|
|
@@ -47,15 +47,23 @@ module.exports = (projectRoot) => {
|
|
|
47
47
|
safelist: {
|
|
48
48
|
standard: ["safelisted", /^html/, /^:root/],
|
|
49
49
|
deep: [/^safelisted-deep-/, /^html/, /^:root/],
|
|
50
|
-
|
|
50
|
+
greedy: [/^data-v-/, /\[data-v-.*\]/, /\[data-v-[a-zA-Z0-9]*\]/]
|
|
51
51
|
},
|
|
52
|
+
rejected: true,
|
|
52
53
|
extractors: [
|
|
53
54
|
{
|
|
54
|
-
extractor: (content)=>{
|
|
55
|
-
//
|
|
56
|
-
|
|
55
|
+
extractor: (content) => {
|
|
56
|
+
// Ищем классы и селекторы с префиксами Tailwind
|
|
57
|
+
const normalClasses = content.match(/[A-Za-z0-9-_:\/]+/g) || [];
|
|
58
|
+
|
|
59
|
+
// Дополнительно ищем Vue атрибуты data-v-*
|
|
60
|
+
// Это важно для правильного распознавания scoped стилей
|
|
61
|
+
const scopedAttrs = content.match(/\[data-v-[a-zA-Z0-9]*\]/g) || [];
|
|
62
|
+
|
|
63
|
+
// Объединяем результаты
|
|
64
|
+
return [...normalClasses, ...scopedAttrs];
|
|
57
65
|
},
|
|
58
|
-
extensions: ['vue'],
|
|
66
|
+
extensions: ['vue', 'js', 'css', 'scss'],
|
|
59
67
|
},
|
|
60
68
|
],
|
|
61
69
|
}),
|
|
@@ -15,7 +15,7 @@
|
|
|
15
15
|
<li class="w-100">
|
|
16
16
|
<!-- Selected Value -->
|
|
17
17
|
<span>
|
|
18
|
-
|
|
18
|
+
{{ optionsSelected ? (optionsSelected.name || optionsSelected[props.value] || optionsSelected) : placeholder }}
|
|
19
19
|
</span>
|
|
20
20
|
</li>
|
|
21
21
|
|
|
@@ -29,7 +29,8 @@
|
|
|
29
29
|
>
|
|
30
30
|
<li @click.stop="selectOption(option)" v-for="option in optionsListed">
|
|
31
31
|
<span v-if="option" class="w-100">
|
|
32
|
-
|
|
32
|
+
|
|
33
|
+
{{ option.name || option[props.value] || option }}
|
|
33
34
|
</span>
|
|
34
35
|
</li>
|
|
35
36
|
</ul>
|
|
@@ -62,6 +63,7 @@ const props = defineProps({
|
|
|
62
63
|
placeholder: { type: String, default: 'Please select an item' },
|
|
63
64
|
select: [String, Object],
|
|
64
65
|
property: String,
|
|
66
|
+
value: String,
|
|
65
67
|
options: { type: Array, default: () => [] },
|
|
66
68
|
validation: Boolean,
|
|
67
69
|
})
|
|
@@ -49,7 +49,7 @@ class GlobalABAC {
|
|
|
49
49
|
|
|
50
50
|
// Автоматическое определение модели по имени ресурса
|
|
51
51
|
getResourceModel(resourceName) {
|
|
52
|
-
if (resourceName === 'posts') resourceName = 'blogposts'
|
|
52
|
+
if (resourceName === 'posts') resourceName = 'blogposts';
|
|
53
53
|
|
|
54
54
|
// Преобразуем название ресурса в singural форму модели
|
|
55
55
|
const modelName = resourceName.endsWith('s')
|
|
@@ -66,8 +66,45 @@ class GlobalABAC {
|
|
|
66
66
|
return model;
|
|
67
67
|
}
|
|
68
68
|
|
|
69
|
+
/**
|
|
70
|
+
* Нормализация результата политики для единообразной обработки
|
|
71
|
+
* @param {any} result - Результат выполнения политики
|
|
72
|
+
* @param {string} policyName - Имя политики для формирования причины
|
|
73
|
+
* @returns {Object} Нормализованный результат
|
|
74
|
+
*/
|
|
75
|
+
_normalizeResult(result, policyName) {
|
|
76
|
+
// Результат уже в формате объекта с нужными полями
|
|
77
|
+
if (result && typeof result === 'object' && ('allow' in result || 'force' in result)) {
|
|
78
|
+
return {
|
|
79
|
+
allow: !!result.allow,
|
|
80
|
+
force: !!result.force,
|
|
81
|
+
reason: result.reason || `POLICY_${policyName.toUpperCase()}`
|
|
82
|
+
};
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
// Boolean результаты
|
|
86
|
+
if (result === true) {
|
|
87
|
+
return { allow: true, force: false, reason: `ALLOWED_BY_${policyName.toUpperCase()}` };
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
if (result === false) {
|
|
91
|
+
return { allow: false, force: false, reason: `DENIED_BY_${policyName.toUpperCase()}` };
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
// Специальные случаи для adminAccessGranted и подобных
|
|
95
|
+
if (result === undefined && policyName === 'AdminModeratorAccessPolicy' &&
|
|
96
|
+
(this._context && this._context.adminAccessGranted)) {
|
|
97
|
+
return { allow: true, force: true, reason: 'ADMIN_MODERATOR_ACCESS_GRANTED' };
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
// Нейтральный результат (пропуск политики)
|
|
101
|
+
return { allow: true, force: false, reason: `NEUTRAL_${policyName.toUpperCase()}` };
|
|
102
|
+
}
|
|
103
|
+
|
|
69
104
|
// Базовый метод проверки доступа
|
|
70
105
|
async checkAccess(context) {
|
|
106
|
+
this._context = context; // Сохраняем контекст для использования в _normalizeResult
|
|
107
|
+
|
|
71
108
|
const {
|
|
72
109
|
user, // Пользователь
|
|
73
110
|
resource, // Тип ресурса
|
|
@@ -124,34 +161,122 @@ class GlobalABAC {
|
|
|
124
161
|
}
|
|
125
162
|
}
|
|
126
163
|
|
|
127
|
-
// Выполнение глобальных политик
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
};
|
|
164
|
+
// Выполнение всех глобальных политик параллельно
|
|
165
|
+
const policyEntries = Object.entries(this.policies.global);
|
|
166
|
+
const policyPromises = policyEntries.map(async ([policyName, policyFn]) => {
|
|
167
|
+
try {
|
|
168
|
+
const result = await policyFn(context);
|
|
169
|
+
return { policyName, result };
|
|
170
|
+
} catch (error) {
|
|
171
|
+
console.error(`Error in policy ${policyName}:`, error);
|
|
172
|
+
// При ошибке возвращаем нейтральный результат
|
|
173
|
+
return { policyName, result: undefined, error };
|
|
135
174
|
}
|
|
136
|
-
}
|
|
175
|
+
});
|
|
137
176
|
|
|
138
|
-
//
|
|
177
|
+
// Ожидаем выполнения всех политик
|
|
178
|
+
const policyResults = await Promise.all(policyPromises);
|
|
179
|
+
|
|
180
|
+
// Обработка результатов глобальных политик
|
|
181
|
+
let hasForceAllow = false;
|
|
182
|
+
let hasForceDisallow = false;
|
|
183
|
+
let hasDeny = false;
|
|
184
|
+
let denyReason = '';
|
|
185
|
+
let allowReason = '';
|
|
186
|
+
|
|
187
|
+
for (const { policyName, result, error } of policyResults) {
|
|
188
|
+
if (error) continue; // Пропускаем политики с ошибками
|
|
189
|
+
|
|
190
|
+
// Нормализуем результат для унифицированной обработки
|
|
191
|
+
const normalizedResult = this._normalizeResult(result, policyName);
|
|
192
|
+
|
|
193
|
+
if (normalizedResult.force) {
|
|
194
|
+
if (normalizedResult.allow) {
|
|
195
|
+
hasForceAllow = true;
|
|
196
|
+
allowReason = normalizedResult.reason;
|
|
197
|
+
} else {
|
|
198
|
+
hasForceDisallow = true;
|
|
199
|
+
denyReason = normalizedResult.reason;
|
|
200
|
+
}
|
|
201
|
+
} else if (!normalizedResult.allow) {
|
|
202
|
+
hasDeny = true;
|
|
203
|
+
if (!denyReason) denyReason = normalizedResult.reason;
|
|
204
|
+
}
|
|
205
|
+
}
|
|
206
|
+
|
|
207
|
+
// Принятие решения на основе результатов
|
|
208
|
+
// 1. Проверка на стопроцентный запрет
|
|
209
|
+
if (hasForceDisallow) {
|
|
210
|
+
return {
|
|
211
|
+
allowed: false,
|
|
212
|
+
reason: denyReason || 'FORCE_DENIED_BY_POLICY'
|
|
213
|
+
};
|
|
214
|
+
}
|
|
215
|
+
|
|
216
|
+
// 2. Проверка на стопроцентный доступ
|
|
217
|
+
if (hasForceAllow) {
|
|
218
|
+
return {
|
|
219
|
+
allowed: true,
|
|
220
|
+
reason: allowReason || 'FORCE_ALLOWED_BY_POLICY'
|
|
221
|
+
};
|
|
222
|
+
}
|
|
223
|
+
|
|
224
|
+
// 3. Проверка на обычный запрет
|
|
225
|
+
if (hasDeny) {
|
|
226
|
+
return {
|
|
227
|
+
allowed: false,
|
|
228
|
+
reason: denyReason || 'DENIED_BY_POLICY'
|
|
229
|
+
};
|
|
230
|
+
}
|
|
231
|
+
|
|
232
|
+
// 4. Проверка политик ресурсов (возможно асинхронное выполнение)
|
|
139
233
|
if (this.policies.resources[resource]) {
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
234
|
+
try {
|
|
235
|
+
const resourceResult = await this.policies.resources[resource](context);
|
|
236
|
+
const normalizedResult = this._normalizeResult(resourceResult, `RESOURCE_${resource}`);
|
|
237
|
+
|
|
238
|
+
if (normalizedResult.force) {
|
|
239
|
+
return {
|
|
240
|
+
allowed: normalizedResult.allow,
|
|
241
|
+
reason: normalizedResult.reason
|
|
242
|
+
};
|
|
243
|
+
}
|
|
244
|
+
|
|
245
|
+
if (!normalizedResult.allow) {
|
|
246
|
+
return {
|
|
247
|
+
allowed: false,
|
|
248
|
+
reason: normalizedResult.reason
|
|
249
|
+
};
|
|
250
|
+
}
|
|
251
|
+
|
|
252
|
+
if (normalizedResult.allow) {
|
|
253
|
+
return {
|
|
254
|
+
allowed: true,
|
|
255
|
+
reason: normalizedResult.reason
|
|
256
|
+
};
|
|
257
|
+
}
|
|
258
|
+
} catch (error) {
|
|
259
|
+
console.error(`Error in resource policy for ${resource}:`, error);
|
|
146
260
|
}
|
|
147
261
|
}
|
|
148
262
|
|
|
149
|
-
// Выполнение расширений от внешних модулей
|
|
150
|
-
|
|
151
|
-
|
|
263
|
+
// 5. Выполнение расширений от внешних модулей
|
|
264
|
+
const extensionPromises = Object.entries(this.policies.extensions).map(async ([moduleName, extensionFn]) => {
|
|
265
|
+
try {
|
|
266
|
+
const extensionResult = await extensionFn(context);
|
|
267
|
+
return { moduleName, result: extensionResult };
|
|
268
|
+
} catch (error) {
|
|
269
|
+
console.error(`Error in extension ${moduleName}:`, error);
|
|
270
|
+
return { moduleName, result: null, error };
|
|
271
|
+
}
|
|
272
|
+
});
|
|
273
|
+
|
|
274
|
+
const extensionResults = await Promise.all(extensionPromises);
|
|
275
|
+
|
|
276
|
+
for (const { moduleName, result, error } of extensionResults) {
|
|
277
|
+
if (error) continue;
|
|
152
278
|
|
|
153
|
-
|
|
154
|
-
if (extensionResult && extensionResult.allowed) {
|
|
279
|
+
if (result && result.allowed) {
|
|
155
280
|
return {
|
|
156
281
|
allowed: true,
|
|
157
282
|
reason: `ALLOWED_BY_${moduleName.toUpperCase()}_EXTENSION`
|
|
@@ -159,7 +284,7 @@ class GlobalABAC {
|
|
|
159
284
|
}
|
|
160
285
|
}
|
|
161
286
|
|
|
162
|
-
// Финальное решение на основе настроек
|
|
287
|
+
// 6. Финальное решение на основе настроек
|
|
163
288
|
return {
|
|
164
289
|
allowed: !this.options.defaultDeny,
|
|
165
290
|
reason: this.options.defaultDeny ? 'ACCESS_DENIED' : 'ACCESS_ALLOWED'
|
|
@@ -269,6 +269,42 @@ class Validator {
|
|
|
269
269
|
return this;
|
|
270
270
|
}
|
|
271
271
|
|
|
272
|
+
/**
|
|
273
|
+
* Проверяет, что значение соответствует одному из указанных типов через уже существующие правила валидатора
|
|
274
|
+
* @param {string[]} types - Массив допустимых типов (например: ['string', 'number', 'null', 'array'])
|
|
275
|
+
* @param {string} [message] - Сообщение об ошибке
|
|
276
|
+
* @returns {Validator}
|
|
277
|
+
*/
|
|
278
|
+
oneOfTypes(types, message) {
|
|
279
|
+
const validators = types.map(type => {
|
|
280
|
+
const schema = Validator.schema();
|
|
281
|
+
if (type === 'string') return schema.string();
|
|
282
|
+
if (type === 'number') return schema.number();
|
|
283
|
+
if (type === 'integer') return schema.integer();
|
|
284
|
+
if (type === 'boolean') return schema.boolean();
|
|
285
|
+
if (type === 'array') return schema.array();
|
|
286
|
+
if (type === 'object') return schema.object({});
|
|
287
|
+
if (type === 'date') return schema.date();
|
|
288
|
+
if (type === 'null') {
|
|
289
|
+
// Кастомный валидатор для null
|
|
290
|
+
return Validator.schema().custom(val => val === null, 'Значение должно быть null');
|
|
291
|
+
}
|
|
292
|
+
throw new Error(`Unsupported type in oneOfTypes: ${type}`);
|
|
293
|
+
});
|
|
294
|
+
|
|
295
|
+
this.rules.push({
|
|
296
|
+
type: 'oneOfTypes',
|
|
297
|
+
check: value => {
|
|
298
|
+
return validators.some(validator => validator.validate(value).isValid);
|
|
299
|
+
},
|
|
300
|
+
param: types,
|
|
301
|
+
message
|
|
302
|
+
});
|
|
303
|
+
|
|
304
|
+
return this;
|
|
305
|
+
}
|
|
306
|
+
|
|
307
|
+
|
|
272
308
|
/**
|
|
273
309
|
* Добавляет пользовательскую проверку
|
|
274
310
|
* @param {function} fn - Функция проверки
|
|
@@ -412,6 +448,7 @@ class Validator {
|
|
|
412
448
|
case 'pattern': return `${context}не соответствует требуемому формату`;
|
|
413
449
|
case 'email': return `${context}должно быть корректным email-адресом`;
|
|
414
450
|
case 'oneOf': return `${context}должно быть одним из: ${rule.param.join(', ')}`;
|
|
451
|
+
case 'oneOfTypes': return `${context}должно быть одного из типов: ${rule.param.join(', ')}`;
|
|
415
452
|
case 'custom': return rule.param;
|
|
416
453
|
case 'items': return `${context}содержит невалидные элементы`;
|
|
417
454
|
case 'object': return `${context}не соответствует типу объекта`;
|
|
@@ -1,12 +1,67 @@
|
|
|
1
1
|
module.exports = function initializeDefaultPolicies(abacAccessControl) {
|
|
2
2
|
// Политика личного владения ресурсом
|
|
3
|
+
abacAccessControl.registerGlobalPolicy('AdminModeratorAccessPolicy', async (context) => {
|
|
4
|
+
const { user, req } = context;
|
|
5
|
+
|
|
6
|
+
// Если пользователь не указан, политика не применяется
|
|
7
|
+
if (!user) {
|
|
8
|
+
return { allow: true, force: false };
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
try {
|
|
12
|
+
// Вариант 3: загружаем пользователя из базы данных
|
|
13
|
+
const userModel = abacAccessControl.db.user;
|
|
14
|
+
const userDoc = await userModel.findById(user).populate('roles');
|
|
15
|
+
|
|
16
|
+
if (userDoc && userDoc.roles) {
|
|
17
|
+
// Сохраняем документ пользователя в контексте для других политик
|
|
18
|
+
context.userDoc = userDoc;
|
|
19
|
+
|
|
20
|
+
// Извлекаем роли из документа
|
|
21
|
+
userRoles = userDoc.roles.map(role =>
|
|
22
|
+
typeof role === 'string' ? role : role.name || role
|
|
23
|
+
);
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
// Проверяем наличие ролей администратора или модератора
|
|
27
|
+
const isAdmin = userRoles.includes('admin');
|
|
28
|
+
const isModerator = userRoles.includes('moderator');
|
|
29
|
+
|
|
30
|
+
|
|
31
|
+
if (isAdmin || isModerator) {
|
|
32
|
+
// Возвращаем стопроцентный доступ
|
|
33
|
+
return {
|
|
34
|
+
allow: true,
|
|
35
|
+
force: true,
|
|
36
|
+
reason: isAdmin ? 'ADMIN_ACCESS_GRANTED' : 'MODERATOR_ACCESS_GRANTED'
|
|
37
|
+
};
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
// Для обычных пользователей не влияем на решение
|
|
41
|
+
return { allow: true, force: false };
|
|
42
|
+
} catch (error) {
|
|
43
|
+
console.error('Error in AdminModeratorPolicy:', error);
|
|
44
|
+
// При ошибке не блокируем доступ, продолжаем другие проверки
|
|
45
|
+
return { allow: true, force: false };
|
|
46
|
+
}
|
|
47
|
+
});
|
|
48
|
+
|
|
3
49
|
abacAccessControl.registerGlobalPolicy('PersonalResourceOwnerPolicy', async (context) => {
|
|
4
50
|
let { user, action, data, currentResource, options } = context;
|
|
5
51
|
const ObjectId = abacAccessControl.db.mongoose.Types.ObjectId;
|
|
6
52
|
|
|
7
53
|
// Для create операций с владением пользователя
|
|
8
|
-
if (action === 'create' && data.owner
|
|
9
|
-
|
|
54
|
+
if (action === 'create' && data.owner?.type === 'user') {
|
|
55
|
+
// Проверяем, что пользователь создает ресурс от своего имени
|
|
56
|
+
if (data.owner.target === user && data.creator.target === user) {
|
|
57
|
+
return { allow: true, force: false };
|
|
58
|
+
} else {
|
|
59
|
+
return {
|
|
60
|
+
allow: false,
|
|
61
|
+
force: false,
|
|
62
|
+
reason: 'UNAUTHORIZED_RESOURCE_CREATION'
|
|
63
|
+
};
|
|
64
|
+
}
|
|
10
65
|
}
|
|
11
66
|
|
|
12
67
|
if (action === 'read') {
|
|
@@ -14,7 +69,8 @@ module.exports = function initializeDefaultPolicies(abacAccessControl) {
|
|
|
14
69
|
const allowedPublicStatuses = ['published', 'active', 'featured'];
|
|
15
70
|
|
|
16
71
|
// Для неавторизованных пользователей или не владельцев
|
|
17
|
-
if (!user || (currentResource && currentResource.creator &&
|
|
72
|
+
if (!user || (currentResource && currentResource.creator &&
|
|
73
|
+
!currentResource.creator.target.equals(new ObjectId(user)))) {
|
|
18
74
|
|
|
19
75
|
if (context.req && context.req.query) {
|
|
20
76
|
// Если статус указан в запросе, проверяем его
|
|
@@ -24,13 +80,21 @@ module.exports = function initializeDefaultPolicies(abacAccessControl) {
|
|
|
24
80
|
// Проверяем, что каждый статус из массива находится в списке разрешенных
|
|
25
81
|
for (const queryStatus of context.req.query.status) {
|
|
26
82
|
if (!allowedPublicStatuses.includes(queryStatus)) {
|
|
27
|
-
return
|
|
83
|
+
return {
|
|
84
|
+
allow: false,
|
|
85
|
+
force: true, // Стопроцентный запрет для неразрешенных статусов
|
|
86
|
+
reason: 'UNAUTHORIZED_STATUS_ACCESS'
|
|
87
|
+
};
|
|
28
88
|
}
|
|
29
89
|
}
|
|
30
90
|
} else {
|
|
31
91
|
// Проверка одиночного статуса
|
|
32
92
|
if (!allowedPublicStatuses.includes(context.req.query.status)) {
|
|
33
|
-
return
|
|
93
|
+
return {
|
|
94
|
+
allow: false,
|
|
95
|
+
force: true, // Стопроцентный запрет для неразрешенных статусов
|
|
96
|
+
reason: 'UNAUTHORIZED_STATUS_ACCESS'
|
|
97
|
+
};
|
|
34
98
|
}
|
|
35
99
|
}
|
|
36
100
|
}
|
|
@@ -38,82 +102,35 @@ module.exports = function initializeDefaultPolicies(abacAccessControl) {
|
|
|
38
102
|
|
|
39
103
|
// Для единичного ресурса
|
|
40
104
|
if (currentResource && !allowedPublicStatuses.includes(currentResource.status)) {
|
|
41
|
-
return
|
|
105
|
+
return {
|
|
106
|
+
allow: false,
|
|
107
|
+
force: true, // Стопроцентный запрет для неразрешенных статусов
|
|
108
|
+
reason: 'UNAUTHORIZED_RESOURCE_ACCESS'
|
|
109
|
+
};
|
|
42
110
|
}
|
|
43
111
|
}
|
|
44
112
|
|
|
45
|
-
|
|
113
|
+
// По умолчанию не влияем на решение для read
|
|
114
|
+
return { allow: true, force: false };
|
|
46
115
|
}
|
|
116
|
+
|
|
47
117
|
// Для update и delete операций
|
|
48
|
-
if ((action === 'edit' || action === 'delete') && currentResource && currentResource.owner
|
|
49
|
-
|
|
118
|
+
if ((action === 'edit' || action === 'delete') && currentResource && currentResource.owner?.type === 'user') {
|
|
119
|
+
// Проверяем владельца
|
|
120
|
+
if (currentResource.creator.target.equals(new ObjectId(user))) {
|
|
121
|
+
return { allow: true, force: false };
|
|
122
|
+
} else {
|
|
123
|
+
return {
|
|
124
|
+
allow: false,
|
|
125
|
+
force: false,
|
|
126
|
+
reason: 'NOT_RESOURCE_OWNER'
|
|
127
|
+
};
|
|
128
|
+
}
|
|
50
129
|
}
|
|
51
|
-
|
|
130
|
+
|
|
131
|
+
// По умолчанию не влияем на решение
|
|
132
|
+
return { allow: true, force: false };
|
|
52
133
|
});
|
|
53
134
|
|
|
54
|
-
// Политика публичного доступа к опубликованным ресурсам
|
|
55
|
-
// abacAccessControl.registerGlobalPolicy('PublishedResourceAccessPolicy', async (context) => {
|
|
56
|
-
// const { currentResource, action } = context;
|
|
57
|
-
|
|
58
|
-
// // Разрешаем чтение опубликованных ресурсов
|
|
59
|
-
// if (
|
|
60
|
-
// action === 'read' &&
|
|
61
|
-
// currentResource?.status === 'published'
|
|
62
|
-
// ) {
|
|
63
|
-
// return true;
|
|
64
|
-
// }
|
|
65
|
-
|
|
66
|
-
// return false;
|
|
67
|
-
// });
|
|
68
|
-
|
|
69
|
-
// Политика ограничения доступа для удаления
|
|
70
|
-
// abacAccessControl.registerGlobalPolicy('DeleteRestrictionPolicy', async (context) => {
|
|
71
|
-
// const { action, currentResource } = context;
|
|
72
|
-
|
|
73
|
-
// // Запрещаем удаление ресурсов с определенным статусом
|
|
74
|
-
// if (
|
|
75
|
-
// action === 'delete' &&
|
|
76
|
-
// currentResource?.status === 'in_use'
|
|
77
|
-
// ) {
|
|
78
|
-
// return false;
|
|
79
|
-
// }
|
|
80
|
-
|
|
81
|
-
// return true;
|
|
82
|
-
// });
|
|
83
|
-
|
|
84
|
-
// Политика проверки статуса пользователя
|
|
85
|
-
// abacAccessControl.registerGlobalPolicy('UserStatusPolicy', async (context) => {
|
|
86
|
-
// const { user, action } = context;
|
|
87
|
-
|
|
88
|
-
// // Блокировка действий для заблокированных пользователей
|
|
89
|
-
// if (user.status === 'blocked') {
|
|
90
|
-
// // Разрешаем только чтение
|
|
91
|
-
// return action === 'read';
|
|
92
|
-
// }
|
|
93
|
-
|
|
94
|
-
// return true;
|
|
95
|
-
// });
|
|
96
|
-
|
|
97
|
-
// // Политика ограничения по времени
|
|
98
|
-
// abacAccessControl.registerGlobalPolicy('TimeBasedAccessPolicy', async (context) => {
|
|
99
|
-
// const { action, currentResource } = context;
|
|
100
|
-
|
|
101
|
-
// // Проверка времени создания ресурса
|
|
102
|
-
// if (currentResource?.createdAt) {
|
|
103
|
-
// const resourceAge = Date.now() - currentResource.createdAt.getTime();
|
|
104
|
-
// const MAX_RESOURCE_AGE = 30 * 24 * 60 * 60 * 1000; // 30 дней
|
|
105
|
-
|
|
106
|
-
// // Ограничение на изменение старых ресурсов
|
|
107
|
-
// if (
|
|
108
|
-
// ['edit', 'delete'].includes(action) &&
|
|
109
|
-
// resourceAge > MAX_RESOURCE_AGE
|
|
110
|
-
// ) {
|
|
111
|
-
// return false;
|
|
112
|
-
// }
|
|
113
|
-
// }
|
|
114
|
-
|
|
115
|
-
// return true;
|
|
116
|
-
// });
|
|
117
|
-
|
|
118
135
|
return abacAccessControl;
|
|
119
136
|
};
|