mirror of
https://github.com/DRYTRIX/TimeTracker.git
synced 2026-01-25 05:58:50 -06:00
This commit addresses multiple incomplete implementations identified in the codebase analysis, focusing on security, functionality, and error handling. Backend Fixes: - Issues module: Implement proper permission filtering for non-admin users - Users can only see issues for projects they have access to - Added permission checks to view_issue and edit_issue routes - Statistics now respect user permissions - Push notifications: Implement proper subscription storage - Created PushSubscription model for browser push notification subscriptions - Updated routes to use new model with proper CRUD operations - Added support for multiple subscriptions per user - Added endpoint to list user subscriptions Integration Improvements: - GitHub: Implement webhook signature verification - Added HMAC SHA-256 signature verification using webhook secret - Uses constant-time comparison to prevent timing attacks - Added webhook_secret field to config schema - QuickBooks: Implement customer and account mapping - Added support for customer mappings (client → QuickBooks customer) - Added support for item mappings (invoice items → QuickBooks items) - Added support for account mappings (expense categories → accounts) - Added default expense account configuration - Improved error handling and logging - Xero: Add customer and account mapping support - Added contact mappings (client → Xero Contact ID) - Added item mappings (invoice items → Xero item codes) - Added account mappings (expense categories → Xero account codes) - Added default expense account configuration - CalDAV: Implement bidirectional sync - Added TimeTracker to Calendar sync direction - Implemented iCalendar event generation from time entries - Added create_or_update_event method to CalDAVClient - Supports bidirectional sync (both directions simultaneously) - Improved error handling for event creation/updates - Trello: Implement bidirectional sync - Added TimeTracker to Trello sync direction - Implemented task to card creation and updates - Automatic board creation for projects if needed - Maps task status to Trello lists - Supports bidirectional sync - Exception handling: Improve error logging in integrations - Replaced silent pass statements with proper error logging - Added debug logging for non-critical failures (user info fetch) - Improved error visibility for debugging - Affected: Google Calendar, Outlook Calendar, Microsoft Teams, Asana, GitLab All changes include proper error handling, logging, and follow existing code patterns. Database migration required for push_subscriptions table.
189 lines
5.8 KiB
Python
189 lines
5.8 KiB
Python
from .user import User
|
|
from .project import Project
|
|
from .time_entry import TimeEntry
|
|
from .task import Task
|
|
from .settings import Settings
|
|
from .invoice import Invoice, InvoiceItem
|
|
from .invoice_template import InvoiceTemplate
|
|
from .currency import Currency, ExchangeRate
|
|
from .tax_rule import TaxRule
|
|
from .payments import Payment, CreditNote, InvoiceReminderSchedule
|
|
from .reporting import SavedReportView, ReportEmailSchedule
|
|
from .client import Client
|
|
from .client_prepaid_consumption import ClientPrepaidConsumption
|
|
from .task_activity import TaskActivity
|
|
from .expense_category import ExpenseCategory
|
|
from .mileage import Mileage
|
|
from .per_diem import PerDiem, PerDiemRate
|
|
from .extra_good import ExtraGood
|
|
from .comment import Comment
|
|
from .focus_session import FocusSession
|
|
from .recurring_block import RecurringBlock
|
|
from .rate_override import RateOverride
|
|
from .saved_filter import SavedFilter
|
|
from .project_cost import ProjectCost
|
|
from .kanban_column import KanbanColumn
|
|
from .time_entry_template import TimeEntryTemplate
|
|
from .activity import Activity
|
|
from .user_favorite_project import UserFavoriteProject
|
|
from .client_note import ClientNote
|
|
from .weekly_time_goal import WeeklyTimeGoal
|
|
from .expense import Expense
|
|
from .permission import Permission, Role
|
|
from .api_token import ApiToken
|
|
from .calendar_event import CalendarEvent
|
|
from .budget_alert import BudgetAlert
|
|
from .import_export import DataImport, DataExport
|
|
from .invoice_pdf_template import InvoicePDFTemplate
|
|
from .audit_log import AuditLog
|
|
from .recurring_invoice import RecurringInvoice
|
|
from .invoice_email import InvoiceEmail
|
|
from .webhook import Webhook, WebhookDelivery
|
|
from .push_subscription import PushSubscription
|
|
from .quote import Quote, QuoteItem, QuotePDFTemplate
|
|
from .quote_attachment import QuoteAttachment
|
|
from .project_attachment import ProjectAttachment
|
|
from .client_attachment import ClientAttachment
|
|
from .quote_template import QuoteTemplate
|
|
from .quote_version import QuoteVersion
|
|
from .warehouse import Warehouse
|
|
from .stock_item import StockItem
|
|
from .warehouse_stock import WarehouseStock
|
|
from .stock_movement import StockMovement
|
|
from .stock_reservation import StockReservation
|
|
from .project_stock_allocation import ProjectStockAllocation
|
|
from .supplier import Supplier
|
|
from .supplier_stock_item import SupplierStockItem
|
|
from .purchase_order import PurchaseOrder, PurchaseOrderItem
|
|
from .contact import Contact
|
|
from .contact_communication import ContactCommunication
|
|
from .deal import Deal
|
|
from .deal_activity import DealActivity
|
|
from .lead import Lead
|
|
from .lead_activity import LeadActivity
|
|
from .project_template import ProjectTemplate
|
|
from .invoice_approval import InvoiceApproval
|
|
from .payment_gateway import PaymentGateway, PaymentTransaction
|
|
from .calendar_integration import CalendarIntegration, CalendarSyncEvent
|
|
from .integration import Integration, IntegrationCredential, IntegrationEvent
|
|
from .integration_external_event_link import IntegrationExternalEventLink
|
|
from .workflow import WorkflowRule, WorkflowExecution
|
|
from .time_entry_approval import TimeEntryApproval, ApprovalPolicy, ApprovalStatus
|
|
from .recurring_task import RecurringTask
|
|
from .client_portal_customization import ClientPortalCustomization
|
|
from .team_chat import ChatChannel, ChatMessage, ChatChannelMember, ChatReadReceipt
|
|
from .client_time_approval import ClientTimeApproval, ClientApprovalPolicy, ClientApprovalStatus
|
|
from .custom_report import CustomReportConfig
|
|
from .gamification import Badge, UserBadge, Leaderboard, LeaderboardEntry
|
|
from .expense_gps import MileageTrack
|
|
from .link_template import LinkTemplate
|
|
from .custom_field_definition import CustomFieldDefinition
|
|
from .salesman_email_mapping import SalesmanEmailMapping
|
|
from .issue import Issue
|
|
|
|
__all__ = [
|
|
"User",
|
|
"Project",
|
|
"TimeEntry",
|
|
"Task",
|
|
"Settings",
|
|
"Invoice",
|
|
"InvoiceItem",
|
|
"Client",
|
|
"TaskActivity",
|
|
"Comment",
|
|
"FocusSession",
|
|
"RecurringBlock",
|
|
"RateOverride",
|
|
"SavedFilter",
|
|
"ProjectCost",
|
|
"InvoiceTemplate",
|
|
"Currency",
|
|
"ExchangeRate",
|
|
"TaxRule",
|
|
"Payment",
|
|
"CreditNote",
|
|
"InvoiceReminderSchedule",
|
|
"SavedReportView",
|
|
"ReportEmailSchedule",
|
|
"KanbanColumn",
|
|
"TimeEntryTemplate",
|
|
"Activity",
|
|
"UserFavoriteProject",
|
|
"ClientNote",
|
|
"WeeklyTimeGoal",
|
|
"Expense",
|
|
"Permission",
|
|
"Role",
|
|
"ApiToken",
|
|
"CalendarEvent",
|
|
"BudgetAlert",
|
|
"DataImport",
|
|
"DataExport",
|
|
"InvoicePDFTemplate",
|
|
"ClientPrepaidConsumption",
|
|
"AuditLog",
|
|
"RecurringInvoice",
|
|
"InvoiceEmail",
|
|
"Webhook",
|
|
"WebhookDelivery",
|
|
"Quote",
|
|
"QuoteItem",
|
|
"QuotePDFTemplate",
|
|
"QuoteAttachment",
|
|
"ProjectAttachment",
|
|
"ClientAttachment",
|
|
"QuoteTemplate",
|
|
"QuoteVersion",
|
|
"Warehouse",
|
|
"StockItem",
|
|
"WarehouseStock",
|
|
"StockMovement",
|
|
"StockReservation",
|
|
"ProjectStockAllocation",
|
|
"Supplier",
|
|
"SupplierStockItem",
|
|
"PurchaseOrder",
|
|
"PurchaseOrderItem",
|
|
"Contact",
|
|
"ContactCommunication",
|
|
"Deal",
|
|
"DealActivity",
|
|
"Lead",
|
|
"LeadActivity",
|
|
"ProjectTemplate",
|
|
"InvoiceApproval",
|
|
"PaymentGateway",
|
|
"PaymentTransaction",
|
|
"CalendarIntegration",
|
|
"CalendarSyncEvent",
|
|
"Integration",
|
|
"IntegrationCredential",
|
|
"IntegrationEvent",
|
|
"IntegrationExternalEventLink",
|
|
"WorkflowRule",
|
|
"WorkflowExecution",
|
|
"TimeEntryApproval",
|
|
"ApprovalPolicy",
|
|
"ApprovalStatus",
|
|
"RecurringTask",
|
|
"ClientPortalCustomization",
|
|
"ChatChannel",
|
|
"ChatMessage",
|
|
"ChatChannelMember",
|
|
"ChatReadReceipt",
|
|
"ClientTimeApproval",
|
|
"ClientApprovalPolicy",
|
|
"ClientApprovalStatus",
|
|
"CustomReportConfig",
|
|
"Badge",
|
|
"UserBadge",
|
|
"Leaderboard",
|
|
"LeaderboardEntry",
|
|
"MileageTrack",
|
|
"LinkTemplate",
|
|
"CustomFieldDefinition",
|
|
"SalesmanEmailMapping",
|
|
"Issue",
|
|
]
|