""" Legal Documents Module for MyWebdav This module provides a base class for legal documents and specific implementations for various legal policies required for a European cloud storage provider. """ from abc import ABC, abstractmethod from datetime import datetime from typing import Dict class LegalDocument(ABC): """ Base class for all legal documents. Provides common structure and methods for generating legal content. """ def __init__( self, company_name: str = "MyWebdav Technologies", last_updated: str = None, contact_email: str = "legal@mywebdav.eu", website: str = "https://mywebdav.eu", ): self.company_name = company_name self.last_updated = last_updated or datetime.now().strftime("%B %d, %Y") self.contact_email = contact_email self.website = website @property @abstractmethod def title(self) -> str: """Return the document title.""" pass @abstractmethod def get_content(self) -> str: """Return the main content of the document as markdown.""" pass def get_header(self) -> str: """Return the standard header for legal documents.""" return f"# {self.title}\n\n**Last Updated:** {self.last_updated}\n\n" def get_footer(self) -> str: """Return the standard footer for legal documents.""" return f"\n## Contact Information\n\nIf you have any questions about this {self.title.lower()}, please contact us:\n\n- **Email:** [{self.contact_email}](mailto:{self.contact_email})\n- **Website:** {self.website}\n- **Address:** MyWebdav Technologies, European Union\n\n{self.company_name}" def to_markdown(self) -> str: """Generate the complete document in Markdown format.""" return self.get_header() + self.get_content() + self.get_footer() def to_html(self) -> str: """Generate the complete document in HTML format.""" # Content is already HTML, just wrap in basic HTML structure html_content = self.get_content() html_content = f""" {self.title}

{self.title}

Last Updated: {self.last_updated}

{html_content}

Contact Information

If you have any questions about this {self.title.lower()}, please contact us:

MyWebdav Technologies

""" return html_content class PrivacyPolicy(LegalDocument): """Privacy Policy document.""" @property def title(self) -> str: return "Privacy Policy" def get_content(self) -> str: return """

1. Introduction

MyWebdav Technologies ("we," "us," or "our") is committed to protecting your privacy and ensuring the security of your personal data. This Privacy Policy explains how we collect, use, disclose, and safeguard your information when you use our MyWebdav cloud storage service (the "Service"), in full compliance with the EU General Data Protection Regulation (GDPR), and other applicable data protection laws.

This policy applies to all users of our Service, including visitors to our website and registered users. By using our Service, you consent to the collection and use of information in accordance with this policy.

2. Data Controller and Contact Information

Data Controller: MyWebdav Technologies
Registered Address: European Union
Data Protection Officer: dpo@mywebdav.eu
Contact Email: privacy@mywebdav.eu

3. Information We Collect

3.1 Personal Data You Provide

When you register for an account or use our Service, we collect:

3.2 Information Collected Automatically

We automatically collect certain information when you use our Service:

3.3 Cookies and Tracking Technologies

We use cookies and similar technologies to:

You can control cookie settings through your browser preferences. However, disabling certain cookies may limit Service functionality.

4. Legal Basis for Processing

We process your personal data based on the following legal grounds under GDPR:

5. How We Use Your Information

We use collected information for the following purposes:

6. Information Sharing and Disclosure

We do not sell your personal data to third parties. We may share information in the following circumstances:

7. International Data Transfers

Your data may be processed in countries outside the EU. We ensure adequate protection through:

All international transfers comply with Chapter V of the GDPR.

8. Data Security

We implement comprehensive security measures to protect your data:

9. Data Retention

We retain personal data only as long as necessary for the purposes outlined in this policy:

10. Your Rights Under GDPR

You have the following rights regarding your personal data:

To exercise these rights, contact our Data Protection Officer at dpo@mywebdav.eu. We will respond within 30 days.

11. Children's Privacy

Our Service is not intended for individuals under 16 years of age. We do not knowingly collect personal data from children under 16. If we become aware of such collection, we will delete the data immediately and terminate the account.

If you are a parent or guardian and believe your child has provided us with personal data, please contact us immediately.

12. Changes to This Privacy Policy

We may update this Privacy Policy to reflect changes in our practices or legal requirements. We will:

Continued use of the Service after changes take effect constitutes acceptance of the updated policy.

13. Complaints and Supervisory Authority

If you believe we have not complied with applicable data protection laws, you have the right to lodge a complaint with a supervisory authority. In the Netherlands, this is the Autoriteit Persoonsgegevens (AP).

We encourage you to contact us first to resolve any concerns.

14. Contact Us

For any questions about this Privacy Policy or our data practices:

""" class TermsOfService(LegalDocument): """Terms of Service document.""" @property def title(self) -> str: return "Terms of Service" def get_content(self) -> str: return """

1. Introduction

These Terms of Service ("Terms") constitute a legally binding agreement between you ("User," "you," or "your") and MyWebdav Technologies ("Company," "we," "us," or "our") governing your use of the MyWebdav cloud storage service (the "Service").

By accessing or using the Service, you acknowledge that you have read, understood, and agree to be bound by these Terms. If you do not agree, you must not use the Service.

2. Service Description

MyWebdav provides cloud-based file storage, sharing, and collaboration tools. The Service includes:

3. User Eligibility and Account Registration

3.1 Eligibility

You must be at least 16 years old and have the legal capacity to enter into these Terms.

3.2 Account Registration

To use the Service, you must create an account with accurate information. You are responsible for maintaining the confidentiality of your account credentials and all activities under your account.

3.3 Account Suspension/Termination

We may suspend or terminate your account for violations of these Terms, illegal activity, or at our discretion with reasonable notice.

4. Acceptable Use Policy

You agree not to:

5. Content Ownership and Rights

5.1 Your Content

You retain ownership of content you upload ("Your Content"). You grant us a limited license to store, process, and transmit Your Content solely to provide the Service.

5.2 Prohibited Content

You may not upload content that is:

5.3 Content Removal

We may remove content that violates these Terms, with or without notice.

6. Service Availability and Limitations

6.1 Availability

We strive for high availability but do not guarantee uninterrupted service. Scheduled maintenance may cause temporary outages.

6.2 Storage Limits

Storage limits vary by plan. Exceeding limits may result in additional charges or service restrictions.

6.3 Fair Usage

Excessive usage that impacts other users may result in throttling or additional charges.

7. Billing and Payment

7.1 Fees

Service fees are as published on our website. Prices may change with 30 days' notice.

7.2 Payment

You agree to pay all charges associated with your account. Failed payments may result in service suspension.

7.3 Refunds

Fees are generally non-refundable except as required by law or at our discretion.

8. Data Protection and Privacy

Your use of the Service is subject to our Privacy Policy, which is incorporated by reference. We comply with GDPR and other data protection regulations.

9. Security and Data Protection

We implement industry-standard security measures, but you acknowledge that no system is completely secure. You are responsible for your data security.

10. Intellectual Property

The Service and its original content are protected by intellectual property laws. You may not copy, modify, or distribute our proprietary materials.

11. Disclaimers

THE SERVICE IS PROVIDED "AS IS" WITHOUT WARRANTIES OF ANY KIND. WE DISCLAIM ALL WARRANTIES, EXPRESS OR IMPLIED, INCLUDING MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.

12. Limitation of Liability

TO THE MAXIMUM EXTENT PERMITTED BY LAW, OUR TOTAL LIABILITY SHALL NOT EXCEED THE AMOUNT PAID BY YOU IN THE 12 MONTHS PRECEDING THE CLAIM.

13. Indemnification

You agree to indemnify and hold us harmless from claims arising from your use of the Service or violation of these Terms.

14. Governing Law and Dispute Resolution

These Terms are governed by the laws of the Netherlands. Disputes shall be resolved through binding arbitration in Amsterdam, Netherlands.

15. Modifications to Terms

We may modify these Terms with reasonable notice. Continued use after changes constitutes acceptance.

16. Severability

If any provision is found invalid, the remaining provisions remain in effect.

17. Entire Agreement

These Terms constitute the entire agreement between you and us regarding the Service.

""" class SecurityPolicy(LegalDocument): """Security Policy document.""" @property def title(self) -> str: return "Security Policy" def get_content(self) -> str: return """

1. Introduction

1.1 Purpose

This policy establishes the framework for securing our cloud storage platform and ensures all personnel understand their security responsibilities.

1.2 Scope

Applies to all employees, contractors, systems, and data managed by MyWebdav Technologies.

2. Governance and Management

2.1 Information Security Management System (ISMS)

We maintain an ISO/IEC 27001-certified ISMS with regular risk assessments, audits, and continuous improvement.

2.2 Roles and Responsibilities

3. Access Control

3.1 Access Management

Access follows the principle of least privilege with multi-factor authentication required for administrative access.

3.2 User Authentication

Strong passwords, regular rotation, and account lockout policies are enforced.

3.3 Remote Access

Secured via VPN with full logging and monitoring.

4. Data Protection and Encryption

4.1 Data Classification

Data classified as Public, Internal, Confidential, or Highly Sensitive with appropriate controls.

4.2 Encryption Standards

4.3 Data Retention and Disposal

Data retained only as necessary with secure deletion methods.

5. Network Security

5.1 Network Segmentation

Isolated networks with firewalls, IDS, and regular monitoring.

5.2 Secure Configuration

Hardened systems following CIS Benchmarks.

6. Physical Security

6.1 Facility Access

Controlled access to data centers with biometric authentication.

6.2 Equipment Security

Secure storage in climate-controlled environments.

7. Incident Response

7.1 Incident Response Plan

Comprehensive plan for identification, containment, eradication, recovery, and notification.

7.2 Breach Notification

Incidents reported within 72 hours (GDPR) or 24 hours (NIS2) as applicable.

8. Secure Development

8.1 Secure Coding Practices

Code reviews, static/dynamic analysis, and vulnerability management.

8.2 Change Management

Formal approval processes for production changes.

9. Third-Party Risk Management

9.1 Vendor Assessment

Security assessments and contractual requirements for all vendors.

10. Compliance and Auditing

10.1 Regulatory Compliance

Compliance with GDPR, NIS2, and ISO/IEC 27001.

10.2 Audits and Assessments

Annual audits, quarterly penetration testing, and continuous monitoring.

10.3 Training

Mandatory annual security training for all personnel.

11. Enforcement

Compliance is mandatory. Violations may result in disciplinary action up to termination.

""" class CookiePolicy(LegalDocument): """Cookie Policy document.""" @property def title(self) -> str: return "Cookie Policy" def get_content(self) -> str: return """

1. What Are Cookies

Cookies are small text files stored on your device when you visit our Service. They help us provide a better user experience.

2. Types of Cookies We Use

2.1 Essential Cookies

Required for basic Service functionality:

2.2 Functional Cookies

Enhance your experience:

2.3 Analytics Cookies

Help us understand usage:

2.4 Marketing Cookies

Used for targeted advertising (with consent):

3. Cookie Management

You can control cookies through:

4. Third-Party Cookies

We may use third-party services that set cookies:

5. Your Rights

Under GDPR, you have rights regarding cookie-based processing:

6. Updates

We may update this policy. Material changes will be communicated via the Service.

""" class DataProcessingAgreement(LegalDocument): """Data Processing Agreement document.""" @property def title(self) -> str: return "Data Processing Agreement" def get_content(self) -> str: return """

1. Introduction

This Data Processing Agreement ("DPA") supplements the Terms of Service between MyWebdav Technologies (the "Processor") and the Customer (the "Controller") regarding the processing of personal data.

2. Definitions

3. Scope and Applicability

This DPA applies to all processing of personal data by the Processor on behalf of the Controller.

4. Processing Purposes

The Processor shall process personal data solely for the purpose of providing the Service as described in the Terms of Service.

5. Data Protection Obligations

5.1 Lawfulness

Processing shall comply with GDPR and other applicable data protection laws.

5.2 Security Measures

The Processor shall implement appropriate technical and organizational measures to ensure data security.

5.3 Confidentiality

All personnel with access to personal data shall maintain confidentiality.

6. Data Subject Rights

The Processor shall assist the Controller in fulfilling data subject rights requests.

7. Subprocessing

The Processor may engage subprocessors with prior notice to the Controller.

8. Data Breach Notification

The Processor shall notify the Controller of any personal data breaches without undue delay.

9. Data Protection Impact Assessment

The Processor shall assist with DPIAs when required.

10. International Data Transfers

Data transfers outside the EU shall comply with GDPR Chapter V.

11. Audit Rights

The Controller may audit the Processor's compliance, subject to confidentiality obligations.

12. Termination

Upon termination, the Processor shall delete or return all personal data.

13. Governing Law

This DPA is governed by the laws of the Netherlands.

""" class ComplianceStatement(LegalDocument): """Compliance Statement document.""" @property def title(self) -> str: return "Compliance Statement" def get_content(self) -> str: return """

1. Introduction

MyWebdav Technologies is committed to maintaining the highest standards of compliance with applicable laws and regulations. This Compliance Statement outlines our commitments and achievements.

2. Regulatory Compliance

We comply with:

3. Certifications and Standards

4. Data Protection

4.1 Data Residency

Customer data is stored within the EU by default, with options for specific country storage.

4.2 Encryption

All data encrypted in transit and at rest using industry-standard algorithms.

4.3 Access Controls

Role-based access control with multi-factor authentication.

5. Security Measures

6. Transparency Reporting

We publish annual transparency reports detailing:

7. Independent Audits

Annual third-party audits verify compliance with all applicable standards.

8. Continuous Improvement

We regularly review and update our compliance program to address emerging threats and regulatory changes.

""" class DataPortabilityDeletionPolicy(LegalDocument): """Data Portability and Deletion Policy document.""" @property def title(self) -> str: return "Data Portability and Deletion Policy" def get_content(self) -> str: return """

1. Introduction

This policy outlines your rights under GDPR regarding data portability and deletion, and how MyWebdav Technologies facilitates these rights.

2. Right to Data Portability

You have the right to receive your personal data in a structured, commonly used, and machine-readable format.

2.1 Scope

Applies to personal data you have provided that is processed based on consent or contract.

2.2 How to Request

Contact us at dpo@mywebdav.eu with "Data Portability Request" in the subject line.

2.3 Format

Data will be provided in JSON or CSV format, depending on the data type.

2.4 Timeline

Requests fulfilled within 30 days, extendable to 60 days for complex requests.

3. Right to Erasure ("Right to be Forgotten")

You have the right to have your personal data erased under certain circumstances.

3.1 Conditions for Erasure

3.2 Exceptions

Erasure not required if processing is necessary for:

3.3 How to Request Deletion

Submit a deletion request via your account settings or contact dpo@mywebdav.eu.

3.4 Account Deletion Process

4. Data Retention

We retain data only as long as necessary:

5. Automated Decision Making

We do not use automated decision making with legal or significant effects on individuals.

6. Contact Information

For data rights requests:

""" class ContactComplaintMechanism(LegalDocument): """Contact and Complaint Mechanism document.""" @property def title(self) -> str: return "Contact and Complaint Mechanism" def get_content(self) -> str: return """

1. Introduction

MyWebdav Technologies provides multiple channels for you to contact us and raise concerns. We are committed to addressing your inquiries promptly and fairly.

2. Contact Information

2.1 General Inquiries

2.2 Technical Support

2.3 Billing Inquiries

2.4 Data Protection

2.5 Legal Matters

3. Complaint Procedure

3.1 How to Submit a Complaint

  1. Contact our support team with details of your complaint
  2. Include relevant account information and timestamps
  3. Provide specific details about the issue

3.2 Complaint Handling Process

  1. Acknowledgment: Within 24 hours
  2. Investigation: Within 5 business days
  3. Resolution: Within 15 business days
  4. Escalation: If unresolved, escalate to management

3.3 Complaint Categories

4. Dispute Resolution

4.1 Internal Resolution

Most complaints resolved through direct communication with our team.

4.2 Mediation

For unresolved disputes, we offer mediation through a neutral third party.

4.3 Legal Action

If internal resolution fails, disputes may be brought before competent courts in the Netherlands.

5. Response Times

6. Feedback and Suggestions

We welcome your feedback to improve our services. Contact us at feedback@mywebdav.eu.

7. Transparency

We publish annual reports on complaint handling and resolution rates.

""" # Utility functions def get_all_legal_documents() -> Dict[str, LegalDocument]: """Return a dictionary of all legal document instances.""" return { "privacy_policy": PrivacyPolicy(), "terms_of_service": TermsOfService(), "security_policy": SecurityPolicy(), "cookie_policy": CookiePolicy(), "data_processing_agreement": DataProcessingAgreement(), "compliance_statement": ComplianceStatement(), "data_portability_deletion_policy": DataPortabilityDeletionPolicy(), "contact_complaint_mechanism": ContactComplaintMechanism(), } def generate_legal_documents(output_dir: str = "static/legal"): """Generate all legal documents as Markdown and HTML files.""" import os os.makedirs(output_dir, exist_ok=True) documents = get_all_legal_documents() for doc_name, doc in documents.items(): # Generate Markdown md_filename = f"{doc_name}.md" md_path = os.path.join(output_dir, md_filename) with open(md_path, "w") as f: f.write(doc.to_markdown()) # Generate HTML html_filename = f"{doc_name}.html" html_path = os.path.join(output_dir, html_filename) with open(html_path, "w") as f: f.write(doc.to_html()) print(f"Generated {md_filename} and {html_filename}") if __name__ == "__main__": generate_legal_documents()