Commit graph

622 commits

Author SHA1 Message Date
Ashwin
39e22b03d0 Implement board creation API and enhance currency handling across frontend components 2026-08-05 22:37:50 +05:30
Ashwin
78abf8acae Refactor RLS context handling and improve security measures
- Updated the `ORG_SCOPED_TABLES` to clarify the exclusion of `security_audit_log` and its implications for RLS policies.
- Added tests to ensure `security_audit_log` remains unexposed and verify the absence of RLS policies.
- Implemented tests for HSTS settings behind a TLS-terminating proxy to ensure proper header emission.
- Enhanced notification API tests to enforce RLS context during notification creation and access.
- Adjusted notification model tests to ensure RLS context is correctly applied for cross-tenant scenarios.
- Refined RLS context management in `conftest.py` to ensure proper session handling across tests.
- Removed deprecated Salesforce settings from the frontend and updated documentation to reflect changes in API behavior.
- Cleaned up environment variable documentation to clarify the impact of `TRUST_PROXY_SSL_HEADER` and other settings.
2026-08-05 17:35:37 +05:30
Ashwin
7f3eacdcf2 Refactor lead and opportunity management:
- Updated lead pipeline and task pipeline models to enhance the is_default field's help text for clarity.
- Modified lead and opportunity email tasks to utilize frontend URLs instead of domain names for better link accuracy.
- Removed outdated Celery task tests for leads and opportunities.
- Streamlined permission checks across lead and opportunity views by introducing a unified is_org_admin function.
- Improved HTML templates for email notifications to ensure correct variable usage and link generation.
- Enhanced kanban view filtering logic to ensure proper access control for users based on their roles.
2026-08-05 11:39:52 +05:30
Ashwin
e5b6beb4ca Refactor permissions and remove unused settings
- Replaced custom admin check with `is_org_admin` in `custom_field_views.py`, `organization_views.py`, `user_views.py`, and `macros/views.py` for consistency and clarity.
- Removed the unused `_is_admin` function from `custom_field_views.py` and `macros/views.py`.
- Updated organization-related views to streamline admin checks and improve error handling.
- Removed `SWAGGER_ROOT_URL` and `GOOGLE_REDIRECT_URI` settings from `settings.py` as they were not utilized.
- Cleaned up Swagger parameters across various modules to remove the now-irrelevant `org` header.
- Adjusted documentation to reflect the removal of `GOOGLE_REDIRECT_URI` and clarify Google OAuth configuration.
- Added database indexes for `Order` and `OrderLineItem` models to improve query performance.
2026-08-05 09:11:11 +05:30
Ashwin
446ac0bdab Refactor URL patterns to use <uid:pk> for unique identifiers across leads, macros, opportunities, and tasks
- Updated URL patterns in leads, macros, opportunity, and tasks to replace <str:pk> with <uid:pk> for better clarity and consistency.
- Adjusted related views to ensure compatibility with the new URL structure.
- Enhanced frontend templates and server-side logic to accommodate changes in URL patterns.
- Improved documentation in tags and templates to clarify usage and functionality.
2026-08-05 08:25:02 +05:30
Ashwin
0e6d880187 Add tests for client links and attachment deletion authorization
- Introduced tests for frontend URL generation in `test_client_links.py` to ensure all links in emails are reachable and correctly formatted.
- Added authorization tests for deleting attachments in `test_attachment_delete_authz.py` for leads and opportunities, ensuring proper access control based on user roles and organization boundaries.
- Updated `LeadAttachmentView` and `OpportunityAttachmentView` to use `get_scoped_or_404` for safer object retrieval, preventing unauthorized access to attachments across organizations.
- Improved documentation regarding the organization API key and personal access tokens, clarifying their scopes and security implications.
- Enhanced frontend token management to support new scope enforcement, allowing users to specify access levels when creating tokens.
2026-08-05 07:02:40 +05:30
Ashwin
6a7e821eed Refactor import views and enhance comment authorization
- Updated `_read_upload` function to enforce file size limit based on actual bytes read instead of client-supplied Content-Length, preventing potential bypasses.
- Added comprehensive tests for import size cap to ensure proper enforcement against various client declarations.
- Introduced `test_approval_authz.py` to validate approval visibility based on case access rules, ensuring unauthorized members cannot view sensitive case information.
- Modified `CommentSerializer` to make `object_id` and `org` read-only, preventing unauthorized edits to comment targets and ownership.
- Enhanced lead import functionality to restrict access to admin and users with sales access, ensuring proper authorization for bulk lead creation.
- Updated task handling in `create_lead_from_file` to correctly impersonate the user during lead creation, preserving the audit trail.
- Added tests for lead upload functionality to verify proper handling of CSV imports, including checks for duplicate titles across organizations and handling of missing email fields.
2026-08-05 06:00:06 +05:30
Ashwin Kumar
ba249bedc1
Merge pull request #735 from xprnio/fix/docker-venv
fix: move venv outside of backend in dockerfile
2026-08-05 05:31:09 +05:30
Ashwin Kumar
c7b2b9750b
Merge pull request #736 from Django-CRM/dev
Refactor API views to improve parameter handling and validation
2026-08-05 05:29:09 +05:30
Ashwin
ef9157f163 Refactor API views to improve parameter handling and validation
- Replaced direct usage of `json.loads` for parsing parameters with dedicated validation functions (`payload_id_list`, `uuid_list_param`, `uuid_param`) across multiple views to enhance error handling and maintainability.
- Updated filtering logic in various views to ensure proper UUID handling for related entities (e.g., `assigned_to`, `teams`, `contacts`, etc.).
- Enhanced permission checks by adding `HasOrgContext` to user-related views to enforce organization context.
- Improved error handling in invoice creation tests to correctly assert permission denial responses.
- Streamlined query parameter processing in Kanban and list views to reduce redundancy and improve clarity.
2026-08-05 05:09:11 +05:30
Ragnar Laud
0cfd54d945
fix: move venv outside of backend in dockerfile
The venv's bin directory gets overwritten when the docker copies the
backend directory into the image. This moves the venv outside of the
backend so that it does not get overwritten.
2026-08-05 01:12:07 +07:00
Ashwin Kumar
4d96be4d95
Merge pull request #733 from Django-CRM/dev
Dev
2026-08-04 22:49:32 +05:30
Ashwin
8f64fbbb6f test: add regression tests for sla_breached case filter to ensure proper SQL generation 2026-08-04 22:49:04 +05:30
Ashwin
1817a6fe61 fix: resolve ambiguous column reference in case list filters 2026-08-04 22:48:55 +05:30
Ashwin
3faf6ee410 feat: enhance filtering across various pages
- Added filtering capabilities to the invoices estimates and recurring pages, displaying filtered list messages when applicable.
- Updated the leads page to include filtering for people and tags, ensuring the filter bar reflects the current state.
- Enhanced the pipeline page with filtering options, including support for board and list views, and improved the handling of parameters.
- Implemented filtering in the solutions page, ensuring the display of all articles regardless of filters applied.
- Improved task management pages to support filtering, including the ability to filter by priority and search terms.
- Updated ticket management to include filtering options for status, priority, and search, with appropriate messaging for filtered results.
- Introduced tests for board fields and presets to ensure compliance with backend filtering capabilities.
2026-08-04 22:48:47 +05:30
Ashwin Kumar
319a402082
Merge pull request #732 from Django-CRM/dev
feat(invoices): add new template creation page and update template li…
2026-08-04 17:56:34 +05:30
Ashwin
1ab7152376 feat(invoices): add new template creation page and update template list actions
- Updated the template list page to link to a new template creation page.
- Implemented a new server-side route for creating invoice templates, including form handling and validation.
- Created a new Svelte component for the template creation form, allowing users to input template details.
- Added admin-only checks to restrict access to template creation.
- Enhanced the template list page with informative disabled buttons for editing templates.

feat(leads): implement lead conversion functionality

- Added a new action to convert leads, creating associated accounts, contacts, and opportunities.
- Updated the lead detail page to include a form for converting leads, with appropriate UX hints.
- Enhanced the lead edit page to display conversion results and links to newly created records.

feat(tags): implement tag archiving and restoring functionality

- Added actions for archiving and restoring tags, with appropriate error handling.
- Updated the tags management page to include controls for archiving and restoring tags.
- Enhanced user feedback for tag actions, including error messages and confirmation prompts.

test: add stub for dynamic public environment variables

- Created a stub for SvelteKit's $env/dynamic/public to facilitate unit testing without a full build.
2026-08-04 17:55:52 +05:30
Ashwin Kumar
e7f4e300ba
Merge pull request #731 from Django-CRM/dev
Dev
2026-08-04 16:09:19 +05:30
Ashwin
86e13796fe feat: implement tag creation functionality with error handling in settings
feat: enhance tag management UI with form for adding new tags

feat: add approval rule management with create, update, deactivate, and delete actions

feat: improve ticket approval settings UI with form handling and error messages

feat: add timer management functionality in timesheet with stop timer action

chore: add Vitest configuration for server-side testing

fix: update development API URL in mobile configuration
2026-08-04 15:13:35 +05:30
Ashwin
24390478e0 Refactor notifications handling: replace SSE with polling mechanism
- Removed the `/api/notifications/stream/` endpoint and associated SSE logic.
- Updated `Bell.svelte` and `notifications.svelte.js` to implement polling for notifications every 45 seconds.
- Introduced connection pooling configuration in environment variables documentation.
- Updated production deployment documentation to recommend WSGI over ASGI for improved database connection management.
2026-08-04 00:18:17 +05:30
Ashwin
9e202325c8 Update integration documentation to replace MCP server with AI agents 2026-08-03 23:16:05 +05:30
Ashwin Kumar
2e2199c54f
Merge pull request #730 from Django-CRM/dev
Dev
2026-08-03 20:48:37 +05:30
Ashwin
880a894668 fix(docs): update Read the Docs URL to reflect the new documentation site 2026-08-03 20:40:44 +05:30
Ashwin
e3b5181b19 Refactor comments for clarity and consistency across multiple screens and services
- Updated comments in LeadsListScreen, MoreScreen, TaskDetailScreen, TaskFormScreen, TasksListScreen, TicketAnalyticsScreen, TicketDetailScreen, TicketsListScreen, ApiService, AuthService, CrashReporting, DealCard, TicketCard, MultiSelectSheet, KanbanColumn, StageStepper, TicketApprovalPanel, TicketPropertiesCard, and TicketTimePanel to improve readability and maintain a consistent style.
- Adjusted punctuation and phrasing for better flow and understanding.
2026-08-03 09:36:48 +05:30
Ashwin Kumar
2d2d3e5c5b
Merge pull request #729 from Django-CRM/dev
Add documentation for self-hosting, production deployment, requiremen…
2026-08-02 20:09:14 +05:30
Ashwin
d6bb754673 Add documentation for self-hosting, production deployment, requirements, security hardening, and troubleshooting
- Created production-deploy.md to outline production deployment steps and configurations.
- Added requirements.md detailing environment prerequisites for self-hosting.
- Introduced security-hardening.md as a checklist for securing multi-tenant deployments.
- Developed troubleshooting.md to address common issues in RLS-backed deployments.
- Configured mkdocs.yml for documentation structure and navigation.
2026-08-02 20:08:12 +05:30
Ashwin Kumar
dfa5140c3c
Merge pull request #728 from Django-CRM/dev
Dev
2026-08-02 09:41:27 +05:30
Ashwin
dc3aa4d613 feat(schema): add validation for lead source and status; update sample data to ensure compliance with new choices 2026-08-02 09:02:53 +05:30
Ashwin
9dc080ddec feat(packs): introduce vertical pack functionality with sample data management; add is_sample field to Account and Case models, implement sample data logging, and create migration scripts for new features 2026-08-02 08:49:06 +05:30
Ashwin Kumar
5d981b98ac
Merge pull request #727 from Django-CRM/dev
fix(docs): update GitHub repository links to use the correct 'django-…
2026-08-01 16:27:24 +05:30
Ashwin
a287aced3a fix(docs): update GitHub repository links to use the correct 'django-crm' organization; ensure consistency across documentation and support pages 2026-08-01 15:46:25 +05:30
Ashwin Kumar
b78226b5a3
Merge pull request #726 from Django-CRM/dev
Dev
2026-08-01 14:42:36 +05:30
Ashwin
8a629a7479 feat(inbound): enhance SNS webhook security by adding TopicArn pinning and certificate validation; update dependencies for cryptography library 2026-08-01 14:42:10 +05:30
Ashwin
e7ef528c8b docs: add CONTRIBUTING.md to guide new contributors; update README.md for clarity and feature highlights 2026-08-01 10:22:16 +05:30
Ashwin
cf789bf09a chore(docs): remove outdated MCP server design and phase 1 implementation plan documents; streamline project documentation 2026-08-01 09:16:08 +05:30
Ashwin
540f1b50e8 feat(tabs): implement role-based visibility for admin tabs and sidebar items; enhance user experience by filtering out admin-only options for non-admin users 2026-07-31 20:50:56 +05:30
Ashwin
72eb9fe34a feat(sidebar): add mobile navigation drawer and sign out link; enhance sidebar accessibility and styling 2026-07-31 20:32:06 +05:30
Ashwin
639cd5fd32 Merge branch 'master' of https://github.com/MicroPyramid/Django-CRM into dev 2026-07-31 19:15:14 +05:30
Ashwin
0471af82a4 fix(tests): update href paths in TestTodayView to remove versioning; ensure consistency with API response structure 2026-07-31 19:15:08 +05:30
Ashwin Kumar
4390b8e2a0
Merge pull request #725 from Nameless-Monster-Nerd/codex/log-missing-account-email
Log missing account emails in tasks
2026-07-31 19:13:19 +05:30
Ashwin
c9250dda3a feat(accounts): add rollup calculations to AccountSerializer and annotate rollups in queryset; implement validation for annual revenue to prevent negative values; enhance access control for account-related views 2026-07-31 17:18:17 +05:30
Nameless-Monster-Nerd
afd38af1db Log missing account emails in tasks 2026-07-29 10:24:46 -04:00
Ashwin
60b316e186 feat(api-key): implement OrgApiKeyView for secure access and rotation of organization API keys; ensure api_key is excluded from public responses and add tests for access control 2026-07-27 22:40:09 +05:30
Ashwin Kumar
9b0109ee63
Merge pull request #724 from MicroPyramid/dev
chore: update dependencies and configurations; migrate to lucide_icon…
2026-07-27 21:51:28 +05:30
Ashwin
52953c07b0 chore: update dependencies and configurations; migrate to lucide_icons_flutter, enhance Gradle settings, and improve selection handling in deals list 2026-07-27 21:50:45 +05:30
Ashwin Kumar
4dac3577af
Merge pull request #723 from MicroPyramid/dev
feat(invoices): centralize invoice access control with new permission…
2026-07-27 21:24:44 +05:30
Ashwin
0a63ba0df6 feat(invoices): centralize invoice access control with new permission checks; refactor views to utilize get_invoice_or_error for consistent authorization 2026-07-27 21:23:24 +05:30
Ashwin Kumar
fb62a1bbd6
Merge pull request #722 from MicroPyramid/dev
feat(user-management): enhance user creation and email validation log…
2026-07-27 20:58:26 +05:30
Ashwin
781da46238 feat(user-management): enhance user creation and email validation logic; ensure unique email per organization and improve error handling in API responses 2026-07-27 20:57:33 +05:30
Ashwin Kumar
399b856544
Merge pull request #721 from MicroPyramid/dev
refactor: remove SessionToken model and related functionality; update…
2026-07-27 20:31:01 +05:30