dmart 1.4.35__py3-none-any.whl → 1.4.37__py3-none-any.whl
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.
- dmart/__init__.py +7 -0
- dmart/alembic/README +1 -0
- dmart/alembic/notes.txt +11 -0
- dmart/alembic/script.py.mako +28 -0
- dmart/alembic.ini +117 -0
- dmart/config.env.sample +27 -0
- dmart/conftest.py +13 -0
- dmart/curl.sh +196 -0
- cxb/assets/EntryRenderer-25YDhRen.js → dmart/cxb/assets/EntryRenderer-DwSsr_qX.js +1 -1
- cxb/assets/ListView-BpAycA2h.js → dmart/cxb/assets/ListView-DDE5x83t.js +1 -1
- cxb/assets/_module-CEW0D5oI.js → dmart/cxb/assets/_module-BNXXWMkB.js +1 -1
- cxb/assets/_module-Bfk8MiCs.js → dmart/cxb/assets/_module-_Y_1Ib3l.js +1 -1
- cxb/assets/index-CTxJ-lDp.js → dmart/cxb/assets/index-Br_OAS0Q.js +1 -1
- cxb/assets/index-iYkH7C67.js → dmart/cxb/assets/index-DwORvtKk.js +1 -1
- cxb/assets/index-Cd-F5j_k.js → dmart/cxb/assets/index-NksiCXM3.js +1 -1
- cxb/assets/index-C6cPO4op.js → dmart/cxb/assets/index-WkeaPz7c.js +1 -1
- cxb/assets/index-ac-Buu_H.js → dmart/cxb/assets/index-ZWZ_PIBi.js +2 -2
- cxb/assets/index-D742rwaM.js → dmart/cxb/assets/index-skKdyGa2.js +1 -1
- {cxb → dmart/cxb}/index.html +1 -1
- dmart.py → dmart/dmart.py +4 -7
- dmart/hypercorn_config.toml +3 -0
- dmart/info.json +1 -0
- dmart/login_creds.sh +7 -0
- dmart/login_creds.sh.sample +7 -0
- dmart/manifest.sh +12 -0
- dmart/plugins/action_log/config.json +13 -0
- dmart/plugins/admin_notification_sender/config.json +13 -0
- dmart/plugins/ldap_manager/config.json +12 -0
- dmart/plugins/ldap_manager/dmart.schema +146 -0
- dmart/plugins/ldap_manager/slapd.conf +53 -0
- dmart/plugins/local_notification/config.json +13 -0
- dmart/plugins/realtime_updates_notifier/config.json +12 -0
- dmart/plugins/redis_db_update/config.json +13 -0
- dmart/plugins/resource_folders_creation/config.json +12 -0
- dmart/plugins/system_notification_sender/config.json +13 -0
- dmart/plugins/update_access_controls/config.json +12 -0
- dmart/publish.sh +57 -0
- dmart/pylint.sh +16 -0
- dmart/pyrightconfig.json +7 -0
- dmart/redis_connections.sh +13 -0
- dmart/reload.sh +56 -0
- dmart/run.sh +3 -0
- dmart/test_utils.py +34 -0
- {utils → dmart/utils}/settings.py +50 -5
- {dmart-1.4.35.dist-info → dmart-1.4.37.dist-info}/METADATA +1 -1
- dmart-1.4.37.dist-info/RECORD +285 -0
- dmart-1.4.37.dist-info/entry_points.txt +2 -0
- dmart-1.4.37.dist-info/top_level.txt +1 -0
- dmart-1.4.35.dist-info/RECORD +0 -264
- dmart-1.4.35.dist-info/entry_points.txt +0 -2
- dmart-1.4.35.dist-info/top_level.txt +0 -24
- pytests/api_user_models_erros_test.py +0 -16
- pytests/api_user_models_requests_test.py +0 -98
- pytests/archive_test.py +0 -72
- pytests/base_test.py +0 -300
- pytests/get_settings_test.py +0 -14
- pytests/json_to_db_migration_test.py +0 -237
- pytests/service_test.py +0 -26
- pytests/test_info.py +0 -55
- pytests/test_status.py +0 -15
- utils/__init__.py +0 -0
- {alembic → dmart/alembic}/__init__.py +0 -0
- {alembic → dmart/alembic}/env.py +0 -0
- {alembic → dmart/alembic}/scripts/__init__.py +0 -0
- {alembic → dmart/alembic}/scripts/calculate_checksums.py +0 -0
- {alembic → dmart/alembic}/scripts/migration_f7a4949eed19.py +0 -0
- {alembic → dmart/alembic}/versions/0f3d2b1a7c21_add_authz_materialized_views.py +0 -0
- {alembic → dmart/alembic}/versions/10d2041b94d4_last_checksum_history.py +0 -0
- {alembic → dmart/alembic}/versions/1cf4e1ee3cb8_ext_permission_with_filter_fields_values.py +0 -0
- {alembic → dmart/alembic}/versions/26bfe19b49d4_rm_failedloginattempts.py +0 -0
- {alembic → dmart/alembic}/versions/3c8bca2219cc_add_otp_table.py +0 -0
- {alembic → dmart/alembic}/versions/6675fd9dfe42_remove_unique_from_sessions_table.py +0 -0
- {alembic → dmart/alembic}/versions/71bc1df82e6a_adding_user_last_login_at.py +0 -0
- {alembic → dmart/alembic}/versions/74288ccbd3b5_initial.py +0 -0
- {alembic → dmart/alembic}/versions/7520a89a8467_rm_activesession_table.py +0 -0
- {alembic → dmart/alembic}/versions/848b623755a4_make_created_nd_updated_at_required.py +0 -0
- {alembic → dmart/alembic}/versions/8640dcbebf85_add_notes_to_users.py +0 -0
- {alembic → dmart/alembic}/versions/91c94250232a_adding_fk_on_owner_shortname.py +0 -0
- {alembic → dmart/alembic}/versions/98ecd6f56f9a_ext_meta_with_owner_group_shortname.py +0 -0
- {alembic → dmart/alembic}/versions/9aae9138c4ef_indexing_created_at_updated_at.py +0 -0
- {alembic → dmart/alembic}/versions/__init__.py +0 -0
- {alembic → dmart/alembic}/versions/b53f916b3f6d_json_to_jsonb.py +0 -0
- {alembic → dmart/alembic}/versions/eb5f1ec65156_adding_user_locked_to_device.py +0 -0
- {alembic → dmart/alembic}/versions/f7a4949eed19_adding_query_policies_to_meta.py +0 -0
- {api → dmart/api}/__init__.py +0 -0
- {api → dmart/api}/info/__init__.py +0 -0
- {api → dmart/api}/info/router.py +0 -0
- {api → dmart/api}/managed/__init__.py +0 -0
- {api → dmart/api}/managed/router.py +0 -0
- {api → dmart/api}/managed/utils.py +0 -0
- {api → dmart/api}/public/__init__.py +0 -0
- {api → dmart/api}/public/router.py +0 -0
- {api → dmart/api}/qr/__init__.py +0 -0
- {api → dmart/api}/qr/router.py +0 -0
- {api → dmart/api}/user/__init__.py +0 -0
- {api → dmart/api}/user/model/__init__.py +0 -0
- {api → dmart/api}/user/model/errors.py +0 -0
- {api → dmart/api}/user/model/requests.py +0 -0
- {api → dmart/api}/user/model/responses.py +0 -0
- {api → dmart/api}/user/router.py +0 -0
- {api → dmart/api}/user/service.py +0 -0
- /bundler.py → /dmart/bundler.py +0 -0
- {config → dmart/config}/__init__.py +0 -0
- {config → dmart/config}/channels.json +0 -0
- {config → dmart/config}/notification.json +0 -0
- {cxb → dmart/cxb}/__init__.py +0 -0
- {cxb → dmart/cxb}/assets/@codemirror-Rn7_6DkE.js +0 -0
- {cxb → dmart/cxb}/assets/@edraj-CS4NwVbD.js +0 -0
- {cxb → dmart/cxb}/assets/@floating-ui-BwwcF-xh.js +0 -0
- {cxb → dmart/cxb}/assets/@formatjs-yKEsAtjs.js +0 -0
- {cxb → dmart/cxb}/assets/@fortawesome-DRW1UCdr.js +0 -0
- {cxb → dmart/cxb}/assets/@jsonquerylang-laKNoFFq.js +0 -0
- {cxb → dmart/cxb}/assets/@lezer-za4Q-8Ew.js +0 -0
- {cxb → dmart/cxb}/assets/@marijn-DXwl3gUT.js +0 -0
- {cxb → dmart/cxb}/assets/@popperjs-l0sNRNKZ.js +0 -0
- {cxb → dmart/cxb}/assets/@replit--ERk53eB.js +0 -0
- {cxb → dmart/cxb}/assets/@roxi-CGMFK4i8.js +0 -0
- {cxb → dmart/cxb}/assets/@typewriter-cCzskkIv.js +0 -0
- {cxb → dmart/cxb}/assets/@zerodevx-BlBZjKxu.js +0 -0
- {cxb → dmart/cxb}/assets/@zerodevx-CVEpe6WZ.css +0 -0
- {cxb → dmart/cxb}/assets/BreadCrumbLite-DAhOx38v.js +0 -0
- {cxb → dmart/cxb}/assets/EntryRenderer-DXytdFp9.css +0 -0
- {cxb → dmart/cxb}/assets/ListView-U8of-_c-.css +0 -0
- {cxb → dmart/cxb}/assets/Prism--hMplq-p.js +0 -0
- {cxb → dmart/cxb}/assets/Prism-Uh6uStUw.css +0 -0
- {cxb → dmart/cxb}/assets/Table2Cols-BsbwicQm.js +0 -0
- {cxb → dmart/cxb}/assets/_..-BvT6vdHa.css +0 -0
- {cxb → dmart/cxb}/assets/_...404_-fuLH_rX9.js +0 -0
- {cxb → dmart/cxb}/assets/_...fallback_-Ba_NLmAE.js +0 -0
- {cxb → dmart/cxb}/assets/_module-Dgq0ZVtz.js +0 -0
- {cxb → dmart/cxb}/assets/ajv-Cpj98o6Y.js +0 -0
- {cxb → dmart/cxb}/assets/axios-CG2WSiiR.js +0 -0
- {cxb → dmart/cxb}/assets/clsx-B-dksMZM.js +0 -0
- {cxb → dmart/cxb}/assets/codemirror-wrapped-line-indent-DPhKvljI.js +0 -0
- {cxb → dmart/cxb}/assets/compare-C3AjiGFR.js +0 -0
- {cxb → dmart/cxb}/assets/compute-scroll-into-view-Bl8rNFhg.js +0 -0
- {cxb → dmart/cxb}/assets/consolite-DlCuI0F9.js +0 -0
- {cxb → dmart/cxb}/assets/crelt-C8TCjufn.js +0 -0
- {cxb → dmart/cxb}/assets/date-fns-l0sNRNKZ.js +0 -0
- {cxb → dmart/cxb}/assets/deepmerge-rn4rBaHU.js +0 -0
- {cxb → dmart/cxb}/assets/dmart_services-AL6-IdDE.js +0 -0
- {cxb → dmart/cxb}/assets/downloadFile-D08i0YDh.js +0 -0
- {cxb → dmart/cxb}/assets/easy-signal-BiPFIK3O.js +0 -0
- {cxb → dmart/cxb}/assets/esm-env-rsSWfq8L.js +0 -0
- {cxb → dmart/cxb}/assets/export-OF_rTiXu.js +0 -0
- {cxb → dmart/cxb}/assets/fast-deep-equal-l0sNRNKZ.js +0 -0
- {cxb → dmart/cxb}/assets/fast-diff-C-IidNf4.js +0 -0
- {cxb → dmart/cxb}/assets/fast-uri-l0sNRNKZ.js +0 -0
- {cxb → dmart/cxb}/assets/flowbite-svelte-BLvjb-sa.js +0 -0
- {cxb → dmart/cxb}/assets/flowbite-svelte-CD54FDqW.css +0 -0
- {cxb → dmart/cxb}/assets/flowbite-svelte-icons-BI8GVhw_.js +0 -0
- {cxb → dmart/cxb}/assets/github-slugger-CQ4oX9Ud.js +0 -0
- {cxb → dmart/cxb}/assets/global-igKv-1g9.js +0 -0
- {cxb → dmart/cxb}/assets/hookar-BMRD9G9H.js +0 -0
- {cxb → dmart/cxb}/assets/immutable-json-patch-DtRO2E_S.js +0 -0
- {cxb → dmart/cxb}/assets/import-1vE3gBat.js +0 -0
- {cxb → dmart/cxb}/assets/index-B-eTh-ZX.js +0 -0
- {cxb → dmart/cxb}/assets/index-BVyxzKtH.js +0 -0
- {cxb → dmart/cxb}/assets/index-BdeNM69f.js +0 -0
- {cxb → dmart/cxb}/assets/index-CC-A1ipE.js +0 -0
- {cxb → dmart/cxb}/assets/index-DTfhnhwd.js +0 -0
- {cxb → dmart/cxb}/assets/index-DdXRK7n9.js +0 -0
- {cxb → dmart/cxb}/assets/index-DtiCmB4o.js +0 -0
- {cxb → dmart/cxb}/assets/index-NBrXBlLA.css +0 -0
- {cxb → dmart/cxb}/assets/info-B986lRiM.js +0 -0
- {cxb → dmart/cxb}/assets/intl-messageformat-Dc5UU-HB.js +0 -0
- {cxb → dmart/cxb}/assets/jmespath-l0sNRNKZ.js +0 -0
- {cxb → dmart/cxb}/assets/json-schema-traverse-l0sNRNKZ.js +0 -0
- {cxb → dmart/cxb}/assets/json-source-map-DRgZidqy.js +0 -0
- {cxb → dmart/cxb}/assets/jsonpath-plus-l0sNRNKZ.js +0 -0
- {cxb → dmart/cxb}/assets/jsonrepair-B30Dx381.js +0 -0
- {cxb → dmart/cxb}/assets/lodash-es-DZVAA2ox.js +0 -0
- {cxb → dmart/cxb}/assets/marked-DKjyhwJX.js +0 -0
- {cxb → dmart/cxb}/assets/marked-gfm-heading-id-U5zO829x.js +0 -0
- {cxb → dmart/cxb}/assets/marked-mangle-CDMeiHC6.js +0 -0
- {cxb → dmart/cxb}/assets/memoize-one-BdPwpGay.js +0 -0
- {cxb → dmart/cxb}/assets/natural-compare-lite-Bg2Xcf-o.js +0 -0
- {cxb → dmart/cxb}/assets/pagination-svelte-D5CyoiE_.js +0 -0
- {cxb → dmart/cxb}/assets/pagination-svelte-v10nAbbM.css +0 -0
- {cxb → dmart/cxb}/assets/plantuml-encoder-C47mzt9T.js +0 -0
- {cxb → dmart/cxb}/assets/prismjs-DTUiLGJu.js +0 -0
- {cxb → dmart/cxb}/assets/profile-BUf-tKMe.js +0 -0
- {cxb → dmart/cxb}/assets/query-CNmXTsgf.js +0 -0
- {cxb → dmart/cxb}/assets/queryHelpers-C9iBWwqe.js +0 -0
- {cxb → dmart/cxb}/assets/scroll-into-view-if-needed-KR58zyjF.js +0 -0
- {cxb → dmart/cxb}/assets/spaces-0oyGvpii.js +0 -0
- {cxb → dmart/cxb}/assets/style-mod-Bs6eFhZE.js +0 -0
- {cxb → dmart/cxb}/assets/svelte-B2XmcTi_.js +0 -0
- {cxb → dmart/cxb}/assets/svelte-awesome-COLlx0DN.css +0 -0
- {cxb → dmart/cxb}/assets/svelte-awesome-DhnMA6Q_.js +0 -0
- {cxb → dmart/cxb}/assets/svelte-datatables-net-CY7LBj6I.js +0 -0
- {cxb → dmart/cxb}/assets/svelte-floating-ui-BlS3sOAQ.js +0 -0
- {cxb → dmart/cxb}/assets/svelte-i18n-CT2KkQaN.js +0 -0
- {cxb → dmart/cxb}/assets/svelte-jsoneditor-BzfX6Usi.css +0 -0
- {cxb → dmart/cxb}/assets/svelte-jsoneditor-CUGSvWId.js +0 -0
- {cxb → dmart/cxb}/assets/svelte-select-CegQKzqH.css +0 -0
- {cxb → dmart/cxb}/assets/svelte-select-CjHAt_85.js +0 -0
- {cxb → dmart/cxb}/assets/tailwind-merge-CJvxXMcu.js +0 -0
- {cxb → dmart/cxb}/assets/tailwind-variants-Cj20BoQ3.js +0 -0
- {cxb → dmart/cxb}/assets/toast-B9WDyfyI.js +0 -0
- {cxb → dmart/cxb}/assets/tslib-pJfR_DrR.js +0 -0
- {cxb → dmart/cxb}/assets/typewriter-editor-DkTVIJdm.js +0 -0
- {cxb → dmart/cxb}/assets/user-DeK_NB5v.js +0 -0
- {cxb → dmart/cxb}/assets/vanilla-picker-l5rcX3cq.js +0 -0
- {cxb → dmart/cxb}/assets/w3c-keyname-Vcq4gwWv.js +0 -0
- {cxb → dmart/cxb}/config.json +0 -0
- {cxb → dmart/cxb}/config.sample.json +0 -0
- {cxb → dmart/cxb}/favicon.ico +0 -0
- {cxb → dmart/cxb}/favicon.png +0 -0
- {data_adapters → dmart/data_adapters}/__init__.py +0 -0
- {data_adapters → dmart/data_adapters}/adapter.py +0 -0
- {data_adapters → dmart/data_adapters}/base_data_adapter.py +0 -0
- {data_adapters → dmart/data_adapters}/file/__init__.py +0 -0
- {data_adapters → dmart/data_adapters}/file/adapter.py +0 -0
- {data_adapters → dmart/data_adapters}/file/adapter_helpers.py +0 -0
- {data_adapters → dmart/data_adapters}/file/archive.py +0 -0
- {data_adapters → dmart/data_adapters}/file/create_index.py +0 -0
- {data_adapters → dmart/data_adapters}/file/create_users_folders.py +0 -0
- {data_adapters → dmart/data_adapters}/file/custom_validations.py +0 -0
- {data_adapters → dmart/data_adapters}/file/drop_index.py +0 -0
- {data_adapters → dmart/data_adapters}/file/health_check.py +0 -0
- {data_adapters → dmart/data_adapters}/file/redis_services.py +0 -0
- {data_adapters → dmart/data_adapters}/helpers.py +0 -0
- {data_adapters → dmart/data_adapters}/sql/__init__.py +0 -0
- {data_adapters → dmart/data_adapters}/sql/adapter.py +0 -0
- {data_adapters → dmart/data_adapters}/sql/adapter_helpers.py +0 -0
- {data_adapters → dmart/data_adapters}/sql/create_tables.py +0 -0
- {data_adapters → dmart/data_adapters}/sql/create_users_folders.py +0 -0
- {data_adapters → dmart/data_adapters}/sql/db_to_json_migration.py +0 -0
- {data_adapters → dmart/data_adapters}/sql/health_check_sql.py +0 -0
- {data_adapters → dmart/data_adapters}/sql/json_to_db_migration.py +0 -0
- {data_adapters → dmart/data_adapters}/sql/update_query_policies.py +0 -0
- /data_generator.py → /dmart/data_generator.py +0 -0
- /get_settings.py → /dmart/get_settings.py +0 -0
- {languages → dmart/languages}/__init__.py +0 -0
- {languages → dmart/languages}/arabic.json +0 -0
- {languages → dmart/languages}/english.json +0 -0
- {languages → dmart/languages}/kurdish.json +0 -0
- {languages → dmart/languages}/loader.py +0 -0
- /main.py → /dmart/main.py +0 -0
- /migrate.py → /dmart/migrate.py +0 -0
- {models → dmart/models}/__init__.py +0 -0
- {models → dmart/models}/api.py +0 -0
- {models → dmart/models}/core.py +0 -0
- {models → dmart/models}/enums.py +0 -0
- /password_gen.py → /dmart/password_gen.py +0 -0
- {plugins → dmart/plugins}/__init__.py +0 -0
- {plugins → dmart/plugins}/action_log/__init__.py +0 -0
- {plugins → dmart/plugins}/action_log/plugin.py +0 -0
- {plugins → dmart/plugins}/admin_notification_sender/__init__.py +0 -0
- {plugins → dmart/plugins}/admin_notification_sender/plugin.py +0 -0
- {plugins → dmart/plugins}/ldap_manager/__init__.py +0 -0
- {plugins → dmart/plugins}/ldap_manager/plugin.py +0 -0
- {plugins → dmart/plugins}/local_notification/__init__.py +0 -0
- {plugins → dmart/plugins}/local_notification/plugin.py +0 -0
- {plugins → dmart/plugins}/realtime_updates_notifier/__init__.py +0 -0
- {plugins → dmart/plugins}/realtime_updates_notifier/plugin.py +0 -0
- {plugins → dmart/plugins}/redis_db_update/__init__.py +0 -0
- {plugins → dmart/plugins}/redis_db_update/plugin.py +0 -0
- {plugins → dmart/plugins}/resource_folders_creation/__init__.py +0 -0
- {plugins → dmart/plugins}/resource_folders_creation/plugin.py +0 -0
- {plugins → dmart/plugins}/system_notification_sender/__init__.py +0 -0
- {plugins → dmart/plugins}/system_notification_sender/plugin.py +0 -0
- {plugins → dmart/plugins}/update_access_controls/__init__.py +0 -0
- {plugins → dmart/plugins}/update_access_controls/plugin.py +0 -0
- /run_notification_campaign.py → /dmart/run_notification_campaign.py +0 -0
- /scheduled_notification_handler.py → /dmart/scheduled_notification_handler.py +0 -0
- /schema_migration.py → /dmart/schema_migration.py +0 -0
- /schema_modulate.py → /dmart/schema_modulate.py +0 -0
- /set_admin_passwd.py → /dmart/set_admin_passwd.py +0 -0
- /sync.py → /dmart/sync.py +0 -0
- {pytests → dmart/utils}/__init__.py +0 -0
- {utils → dmart/utils}/access_control.py +0 -0
- {utils → dmart/utils}/async_request.py +0 -0
- {utils → dmart/utils}/exporter.py +0 -0
- {utils → dmart/utils}/firebase_notifier.py +0 -0
- {utils → dmart/utils}/generate_email.py +0 -0
- {utils → dmart/utils}/helpers.py +0 -0
- {utils → dmart/utils}/hypercorn_config.py +0 -0
- {utils → dmart/utils}/internal_error_code.py +0 -0
- {utils → dmart/utils}/jwt.py +0 -0
- {utils → dmart/utils}/logger.py +0 -0
- {utils → dmart/utils}/middleware.py +0 -0
- {utils → dmart/utils}/notification.py +0 -0
- {utils → dmart/utils}/password_hashing.py +0 -0
- {utils → dmart/utils}/plugin_manager.py +0 -0
- {utils → dmart/utils}/query_policies_helper.py +0 -0
- {utils → dmart/utils}/regex.py +0 -0
- {utils → dmart/utils}/repository.py +0 -0
- {utils → dmart/utils}/router_helper.py +0 -0
- {utils → dmart/utils}/sms_notifier.py +0 -0
- {utils → dmart/utils}/social_sso.py +0 -0
- {utils → dmart/utils}/templates/activation.html.j2 +0 -0
- {utils → dmart/utils}/templates/reminder.html.j2 +0 -0
- {utils → dmart/utils}/ticket_sys_utils.py +0 -0
- {utils → dmart/utils}/web_notifier.py +0 -0
- /websocket.py → /dmart/websocket.py +0 -0
- {dmart-1.4.35.dist-info → dmart-1.4.37.dist-info}/WHEEL +0 -0
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
include /etc/openldap/schema/core.schema
|
|
2
|
+
include /etc/openldap/schema/cosine.schema
|
|
3
|
+
include /etc/openldap/schema/inetorgperson.schema
|
|
4
|
+
#include /etc/openldap/schema/openldap.schema
|
|
5
|
+
#include /etc/openldap/schema/nis.schema
|
|
6
|
+
include /etc/openldap/schema/dmart.schema
|
|
7
|
+
|
|
8
|
+
#pidfile /var/lib/openldap/run/slapd.pid
|
|
9
|
+
#argsfile /var/lib/openldap/run/slapd.args
|
|
10
|
+
|
|
11
|
+
modulepath /usr/lib/openldap
|
|
12
|
+
moduleload back_mdb.so
|
|
13
|
+
#moduleload accesslog.so
|
|
14
|
+
# moduleload memberof.so
|
|
15
|
+
|
|
16
|
+
loglevel conns filter acl config stats stats2
|
|
17
|
+
# loglevel 0
|
|
18
|
+
disallow bind_anon
|
|
19
|
+
|
|
20
|
+
security ssf=1 update_ssf=112 simple_bind=64
|
|
21
|
+
|
|
22
|
+
# TLSCertificateFile /etc/ssl/ipa_imx_sh.crt
|
|
23
|
+
# TLSCertificateKeyFile /etc/ssl/private/ipa_imx_sh.key
|
|
24
|
+
# TLSCACertificateFile /etc/ssl/ipa_imx_sh.ca-bundle
|
|
25
|
+
|
|
26
|
+
# TLSCertificateFile /etc/openldap/certs/cert.pem
|
|
27
|
+
# TLSCertificateKeyFile /etc/openldap/certs/key.pem
|
|
28
|
+
|
|
29
|
+
access to *
|
|
30
|
+
by self write
|
|
31
|
+
by users read
|
|
32
|
+
by anonymous auth
|
|
33
|
+
by * none
|
|
34
|
+
|
|
35
|
+
|
|
36
|
+
database mdb
|
|
37
|
+
maxsize 1073741824
|
|
38
|
+
suffix "dc=dmart"
|
|
39
|
+
rootdn "cn=root,dc=dmart"
|
|
40
|
+
# Generate by running ... slappasswd -h {SSHA}
|
|
41
|
+
rootpw
|
|
42
|
+
# directory /var/lib/openldap/openldap-data
|
|
43
|
+
directory /var/lib/ldap
|
|
44
|
+
checkpoint 256 5
|
|
45
|
+
index objectClass eq
|
|
46
|
+
index cn eq,sub
|
|
47
|
+
#overlay accesslog
|
|
48
|
+
#logdb cn=log
|
|
49
|
+
#logops writes reads
|
|
50
|
+
#logold (objectclass=freexUser)
|
|
51
|
+
# overlay memberof
|
|
52
|
+
|
|
53
|
+
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
{
|
|
2
|
+
"shortname": "local_notification",
|
|
3
|
+
"is_active": true,
|
|
4
|
+
"filters": {
|
|
5
|
+
"subpaths": ["__ALL__"],
|
|
6
|
+
"resource_types": ["ticket", "reaction", "comment"],
|
|
7
|
+
"schema_shortnames": ["__ALL__"],
|
|
8
|
+
"actions": ["create", "update", "progress_ticket"]
|
|
9
|
+
},
|
|
10
|
+
"type": "hook",
|
|
11
|
+
"ordinal": 1,
|
|
12
|
+
"listen_time": "after"
|
|
13
|
+
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
{
|
|
2
|
+
"shortname": "realtime_updates_notifier",
|
|
3
|
+
"is_active": true,
|
|
4
|
+
"filters": {
|
|
5
|
+
"subpaths": ["__ALL__"],
|
|
6
|
+
"resource_types": ["__ALL__"],
|
|
7
|
+
"schema_shortnames": ["__ALL__"],
|
|
8
|
+
"actions": ["create", "update", "delete", "progress_ticket", "attach", "move", "lock", "unlock"]
|
|
9
|
+
},
|
|
10
|
+
"type": "hook",
|
|
11
|
+
"listen_time": "after"
|
|
12
|
+
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
{
|
|
2
|
+
"shortname": "redis_db_update",
|
|
3
|
+
"is_active": false,
|
|
4
|
+
"filters": {
|
|
5
|
+
"subpaths": ["__ALL__"],
|
|
6
|
+
"resource_types": ["content", "ticket", "permission", "role", "group", "user", "schema", "notification", "folder", "comment", "json", "lock", "media", "alteration", "Relationship"],
|
|
7
|
+
"schema_shortnames": ["__ALL__"],
|
|
8
|
+
"actions": ["create", "update", "delete", "move","progress_ticket"]
|
|
9
|
+
},
|
|
10
|
+
"type": "hook",
|
|
11
|
+
"ordinal": 2,
|
|
12
|
+
"listen_time": "after"
|
|
13
|
+
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
{
|
|
2
|
+
"shortname": "resource_folders_creation",
|
|
3
|
+
"is_active": true,
|
|
4
|
+
"filters": {
|
|
5
|
+
"subpaths": ["__ALL__"],
|
|
6
|
+
"resource_types": ["user", "space"],
|
|
7
|
+
"schema_shortnames": ["__ALL__"],
|
|
8
|
+
"actions": ["create"]
|
|
9
|
+
},
|
|
10
|
+
"type": "hook",
|
|
11
|
+
"listen_time": "after"
|
|
12
|
+
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
{
|
|
2
|
+
"shortname": "system_notification_sender",
|
|
3
|
+
"is_active": false,
|
|
4
|
+
"filters": {
|
|
5
|
+
"subpaths": ["__ALL__"],
|
|
6
|
+
"resource_types": ["__ALL__"],
|
|
7
|
+
"schema_shortnames": ["__ALL__"],
|
|
8
|
+
"actions": ["progress_ticket", "view", "create", "update", "delete", "attach", "move"]
|
|
9
|
+
},
|
|
10
|
+
"type": "hook",
|
|
11
|
+
"ordinal": 1,
|
|
12
|
+
"listen_time": "after"
|
|
13
|
+
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
{
|
|
2
|
+
"shortname": "update_access_controls",
|
|
3
|
+
"is_active": true,
|
|
4
|
+
"filters": {
|
|
5
|
+
"subpaths": ["roles", "groups", "permissions", "users"],
|
|
6
|
+
"resource_types": ["group", "role", "permission", "user"],
|
|
7
|
+
"schema_shortnames": ["__ALL__"],
|
|
8
|
+
"actions": ["create", "update", "delete"]
|
|
9
|
+
},
|
|
10
|
+
"type": "hook",
|
|
11
|
+
"listen_time": "after"
|
|
12
|
+
}
|
dmart/publish.sh
ADDED
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
#!/bin/bash
|
|
2
|
+
set -e
|
|
3
|
+
|
|
4
|
+
cd "$(dirname "$0")"
|
|
5
|
+
|
|
6
|
+
echo "Cleaning up dist/, build/, and temporary files..."
|
|
7
|
+
rm -rf dist/ build/ *.egg-info dmart info.json
|
|
8
|
+
|
|
9
|
+
echo "Building CXB..."
|
|
10
|
+
CXB_DIR="../cxb"
|
|
11
|
+
if [ -d "$CXB_DIR" ]; then
|
|
12
|
+
if [ -f "config.json" ]; then
|
|
13
|
+
cp "config.json" "$CXB_DIR/public/config.json"
|
|
14
|
+
elif [ -f "../config.json" ]; then
|
|
15
|
+
cp "../config.json" "$CXB_DIR/public/config.json"
|
|
16
|
+
elif [ ! -f "$CXB_DIR/public/config.json" ] && [ -f "$CXB_DIR/public/config.sample.json" ]; then
|
|
17
|
+
cp "$CXB_DIR/public/config.sample.json" "$CXB_DIR/public/config.json"
|
|
18
|
+
fi
|
|
19
|
+
pushd "$CXB_DIR"
|
|
20
|
+
yarn install
|
|
21
|
+
yarn build
|
|
22
|
+
popd
|
|
23
|
+
|
|
24
|
+
rm -rf cxb
|
|
25
|
+
cp -r "$CXB_DIR/dist/client" cxb
|
|
26
|
+
touch cxb/__init__.py
|
|
27
|
+
else
|
|
28
|
+
echo "CXB directory not found at $CXB_DIR"
|
|
29
|
+
exit 1
|
|
30
|
+
fi
|
|
31
|
+
|
|
32
|
+
echo "Installing dependencies..."
|
|
33
|
+
python3 -m pip install --upgrade pip build twine
|
|
34
|
+
python3 -m pip install .
|
|
35
|
+
if [ -d "requirements" ]; then
|
|
36
|
+
for req in requirements/*.txt; do
|
|
37
|
+
if [ -f "$req" ] && [[ "$req" != *"test.txt" ]]; then
|
|
38
|
+
python3 -m pip install -r "$req"
|
|
39
|
+
fi
|
|
40
|
+
done
|
|
41
|
+
fi
|
|
42
|
+
|
|
43
|
+
echo "Creating standalone bundle..."
|
|
44
|
+
python3 bundler.py
|
|
45
|
+
|
|
46
|
+
echo "Building dmart wheel and sdist..."
|
|
47
|
+
python3 -m build
|
|
48
|
+
|
|
49
|
+
rm -rf cxb
|
|
50
|
+
ln -s "../cxb/dist/client" cxb
|
|
51
|
+
|
|
52
|
+
if [ -f "dmart" ]; then
|
|
53
|
+
mv dmart dist/
|
|
54
|
+
fi
|
|
55
|
+
|
|
56
|
+
echo "Uploading to PyPI..."
|
|
57
|
+
twine upload --non-interactive dist/*.whl
|
dmart/pylint.sh
ADDED
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
#!/bin/bash
|
|
2
|
+
|
|
3
|
+
declare -i RESULT=0
|
|
4
|
+
export PYRIGHT_PYTHON_FORCE_VERSION=latest
|
|
5
|
+
echo "Pyright ..."
|
|
6
|
+
python -m pyright .
|
|
7
|
+
RESULT+=$?
|
|
8
|
+
echo "Ruff ..."
|
|
9
|
+
python -m ruff check --exclude pytests --exclude alembic .
|
|
10
|
+
RESULT+=$?
|
|
11
|
+
echo "Mypy ..."
|
|
12
|
+
python -m mypy --explicit-package-bases --warn-return-any --check-untyped-defs --exclude loadtest --exclude pytests --exclude alembic .
|
|
13
|
+
RESULT+=$?
|
|
14
|
+
|
|
15
|
+
echo "Result : $RESULT"
|
|
16
|
+
exit $RESULT
|
dmart/pyrightconfig.json
ADDED
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
REDIS_HOST="$(./get_settings.py | jq -r .redis_host)"
|
|
2
|
+
RESULT+=$?
|
|
3
|
+
REDIS_PORT="$(./get_settings.py | jq -r .redis_port)"
|
|
4
|
+
RESULT+=$?
|
|
5
|
+
REDIS_PASSWORD="$(./get_settings.py | jq -r .redis_password)"
|
|
6
|
+
[ -z $REDIS_PASSWORD ] || REDIS_PASSWORD="--no-auth-warning -a $REDIS_PASSWORD"
|
|
7
|
+
|
|
8
|
+
while true
|
|
9
|
+
do
|
|
10
|
+
redis-cli -h ${REDIS_HOST} -p ${REDIS_PORT} ${REDIS_PASSWORD} info | grep connected_clients
|
|
11
|
+
redis-cli -h ${REDIS_HOST} -p ${REDIS_PORT} ${REDIS_PASSWORD} info | grep blocked_clients
|
|
12
|
+
sleep 1
|
|
13
|
+
done
|
dmart/reload.sh
ADDED
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
#!/bin/bash
|
|
2
|
+
|
|
3
|
+
declare -i RESULT=0
|
|
4
|
+
source ./login_creds.sh
|
|
5
|
+
RESULT+=$?
|
|
6
|
+
CHECK_MODE="$(./get_settings.py | jq -r .active_data_db)"
|
|
7
|
+
|
|
8
|
+
RESULT+=$?
|
|
9
|
+
PORT="$(./get_settings.py | jq -r .listening_port)"
|
|
10
|
+
RESULT+=$?
|
|
11
|
+
# APP_URL="$(./get_settings.py | jq -r .app_url)"
|
|
12
|
+
APP_URL="http://localhost:$PORT"
|
|
13
|
+
|
|
14
|
+
if [[ "$CHECK_MODE" == "file" ]]; then
|
|
15
|
+
REDIS_HOST="$(./get_settings.py | jq -r .redis_host)"
|
|
16
|
+
RESULT+=$?
|
|
17
|
+
REDIS_PORT="$(./get_settings.py | jq -r .redis_port)"
|
|
18
|
+
RESULT+=$?
|
|
19
|
+
REDIS_PASSWORD="$(./get_settings.py | jq -r .redis_password)"
|
|
20
|
+
[ -z $REDIS_PASSWORD ] || REDIS_PASSWORD="--no-auth-warning -a $REDIS_PASSWORD"
|
|
21
|
+
time ./create_index.py --flushall
|
|
22
|
+
RESULT+=$?
|
|
23
|
+
fi
|
|
24
|
+
|
|
25
|
+
(which systemctl > /dev/null && systemctl --user list-unit-files dmart.service > /dev/null && systemctl --user restart dmart.service) || \
|
|
26
|
+
( [[ -x "/etc/init.d/dmart" ]] && /etc/init.d/dmart restart )
|
|
27
|
+
RESULT+=$?
|
|
28
|
+
sleep 2
|
|
29
|
+
# RESP=$(curl --write-out '%{http_code}' --silent --output /dev/null "${APP_URL}")
|
|
30
|
+
RESP="000"
|
|
31
|
+
COUNTER=0
|
|
32
|
+
while [ $RESP -ne "200" ]; do
|
|
33
|
+
sleep 1
|
|
34
|
+
COUNTER=$((COUNTER+1))
|
|
35
|
+
echo "Waiting for the server to come up ${RESP} ${COUNTER} seconds"
|
|
36
|
+
RESP=$(curl --write-out '%{http_code}' --silent --connect-timeout 0.5 --output /dev/null "${APP_URL}")
|
|
37
|
+
[[ $COUNTER -ge 30 ]] && break
|
|
38
|
+
done
|
|
39
|
+
sleep 2
|
|
40
|
+
|
|
41
|
+
TOKEN=$(curl -s "${APP_URL}/user/login" -H 'Content-Type: application/json' -d "${SUPERMAN}" | jq -r '.records[0].attributes.access_token')
|
|
42
|
+
curl -s -H "Authorization: Bearer ${TOKEN}" -H "$CT" $APP_URL/user/profile | jq -r '.status'
|
|
43
|
+
RESULT+=$?
|
|
44
|
+
|
|
45
|
+
sleep 1
|
|
46
|
+
curl -s -H "Authorization: Bearer ${TOKEN}" "${APP_URL}/user/profile" | jq '.records[0].attributes.roles'
|
|
47
|
+
RESULT+=$?
|
|
48
|
+
if [[ "$CHECK_MODE" == "file" ]]; then
|
|
49
|
+
sleep 1
|
|
50
|
+
redis-cli -h ${REDIS_HOST} -p ${REDIS_PORT} ${REDIS_PASSWORD} JSON.GET users_permissions_dmart | jq -R '.|fromjson|keys|length'
|
|
51
|
+
# RESULT+=$?
|
|
52
|
+
fi
|
|
53
|
+
|
|
54
|
+
|
|
55
|
+
echo "Sum of exist codes = $RESULT"
|
|
56
|
+
exit $RESULT
|
dmart/run.sh
ADDED
dmart/test_utils.py
ADDED
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
from fastapi import status
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
def check_repeated_shortname(response):
|
|
5
|
+
json_response = response.json()
|
|
6
|
+
assert response.status_code == status.HTTP_400_BAD_REQUEST
|
|
7
|
+
assert "failed" == json_response.get("status")
|
|
8
|
+
assert "request" == json_response.get("error", {}).get("type")
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
def check_not_found(response):
|
|
12
|
+
json_response = response.json()
|
|
13
|
+
assert response.status_code == status.HTTP_404_NOT_FOUND
|
|
14
|
+
assert "failed" == json_response.get("status")
|
|
15
|
+
assert "db" == json_response.get("error").get("type")
|
|
16
|
+
|
|
17
|
+
|
|
18
|
+
def check_unauthorized(response):
|
|
19
|
+
json_response = response.json()
|
|
20
|
+
assert response.status_code == status.HTTP_401_UNAUTHORIZED
|
|
21
|
+
assert "failed" == json_response.get("status")
|
|
22
|
+
assert "auth" == json_response.get("error", {}).get("type")
|
|
23
|
+
|
|
24
|
+
|
|
25
|
+
def assert_code_and_status_success(response):
|
|
26
|
+
if response.status_code != status.HTTP_200_OK:
|
|
27
|
+
print(
|
|
28
|
+
"\n\n\n\n\n========================= ERROR RESPONSE: =========================n:",
|
|
29
|
+
response.json(),
|
|
30
|
+
"\n\n\n\n\n",
|
|
31
|
+
)
|
|
32
|
+
assert response.status_code == status.HTTP_200_OK
|
|
33
|
+
json_response = response.json()
|
|
34
|
+
assert json_response["status"] == "success"
|
|
@@ -2,15 +2,62 @@
|
|
|
2
2
|
|
|
3
3
|
import json
|
|
4
4
|
import os
|
|
5
|
+
import random
|
|
5
6
|
import re
|
|
6
7
|
import string
|
|
7
|
-
import
|
|
8
|
+
import secrets
|
|
8
9
|
from venv import logger
|
|
9
10
|
|
|
10
11
|
from pydantic import Field
|
|
11
12
|
from pydantic_settings import BaseSettings, SettingsConfigDict
|
|
12
13
|
from pathlib import Path
|
|
13
14
|
|
|
15
|
+
def get_env_file():
|
|
16
|
+
env_file = os.getenv("BACKEND_ENV")
|
|
17
|
+
|
|
18
|
+
if env_file and os.path.exists(env_file):
|
|
19
|
+
return env_file
|
|
20
|
+
|
|
21
|
+
if not env_file or env_file == "config.env":
|
|
22
|
+
if os.path.exists("config.env"):
|
|
23
|
+
return "config.env"
|
|
24
|
+
|
|
25
|
+
dmart_home = Path.home() / ".dmart"
|
|
26
|
+
home_config = dmart_home / "config.env"
|
|
27
|
+
|
|
28
|
+
if not home_config.exists():
|
|
29
|
+
if not (os.path.exists(".git") or os.path.exists("setup.py")):
|
|
30
|
+
try:
|
|
31
|
+
dmart_home.mkdir(parents=True, exist_ok=True)
|
|
32
|
+
(dmart_home / "logs").mkdir(parents=True, exist_ok=True)
|
|
33
|
+
(dmart_home / "spaces").mkdir(parents=True, exist_ok=True)
|
|
34
|
+
|
|
35
|
+
jwt_secret = secrets.token_urlsafe(32)
|
|
36
|
+
|
|
37
|
+
config_content = f"""# dmart configuration
|
|
38
|
+
JWT_SECRET="{jwt_secret}"
|
|
39
|
+
JWT_ALGORITHM="HS256"
|
|
40
|
+
LOG_FILE="{dmart_home / 'logs' / 'dmart.ljson.log'}"
|
|
41
|
+
WS_LOG_FILE="{dmart_home / 'logs' / 'websocket.ljson.log'}"
|
|
42
|
+
|
|
43
|
+
# Database configuration
|
|
44
|
+
ACTIVE_DATA_DB="file"
|
|
45
|
+
SPACES_FOLDER="{dmart_home / 'spaces'}"
|
|
46
|
+
DATABASE_DRIVER="sqlite+pysqlite"
|
|
47
|
+
DATABASE_NAME="{dmart_home / 'dmart.db'}"
|
|
48
|
+
|
|
49
|
+
# Server configuration
|
|
50
|
+
LISTENING_HOST="0.0.0.0"
|
|
51
|
+
LISTENING_PORT=8282
|
|
52
|
+
"""
|
|
53
|
+
home_config.write_text(config_content)
|
|
54
|
+
except Exception:
|
|
55
|
+
pass
|
|
56
|
+
|
|
57
|
+
if home_config.exists():
|
|
58
|
+
return str(home_config)
|
|
59
|
+
|
|
60
|
+
return env_file or "config.env"
|
|
14
61
|
|
|
15
62
|
class Settings(BaseSettings):
|
|
16
63
|
"""Main settings class"""
|
|
@@ -113,10 +160,8 @@ class Settings(BaseSettings):
|
|
|
113
160
|
|
|
114
161
|
|
|
115
162
|
model_config = SettingsConfigDict(
|
|
116
|
-
env_file=
|
|
117
|
-
|
|
118
|
-
str(Path(__file__).resolve().parent.parent.parent / "config.env") if __file__.endswith(".pyc") else "config.env"
|
|
119
|
-
), env_file_encoding="utf-8"
|
|
163
|
+
env_file=get_env_file(),
|
|
164
|
+
env_file_encoding="utf-8"
|
|
120
165
|
)
|
|
121
166
|
|
|
122
167
|
def load_config_files(self) -> None:
|