Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

update privacy-policy and terms-of-service #6505

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions seahub/base/context_processors.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
MEDIA_ROOT, SHOW_LOGOUT_ICON, CUSTOM_LOGO_PATH, CUSTOM_FAVICON_PATH, \
ENABLE_SEAFILE_DOCS, LOGIN_BG_IMAGE_PATH, \
CUSTOM_LOGIN_BG_PATH, ENABLE_SHARE_LINK_REPORT_ABUSE, \
PRIVACY_POLICY_LINK, TERMS_OF_SERVICE_LINK, ENABLE_SEADOC, \
ENABLE_PRIVACY_POLICY, ENABLE_TERMS_OF_SERVICE, ENABLE_SEADOC, \
ENABLE_SEATABLE_INTEGRATION

from seahub.organizations.models import OrgAdminSettings
Expand All @@ -35,7 +35,7 @@
from seahub.avatar.templatetags.avatar_tags import api_avatar_url


from seahub.utils import HAS_FILE_SEARCH, EVENTS_ENABLED, is_pro_version, ENABLE_REPO_AUTO_DEL, \
from seahub.utils import EVENTS_ENABLED, is_pro_version, ENABLE_REPO_AUTO_DEL, \
IS_DB_SQLITE3, HAS_FILE_SEARCH, HAS_FILE_SEASEARCH

try:
Expand Down Expand Up @@ -166,8 +166,8 @@ def base(request):
'service_url': get_service_url().rstrip('/'),
'enable_file_scan': ENABLE_FILE_SCAN,
'avatar_url': avatar_url if avatar_url else '',
'privacy_policy_link': PRIVACY_POLICY_LINK,
'terms_of_service_link': TERMS_OF_SERVICE_LINK,
'enable_privacy_policy': ENABLE_PRIVACY_POLICY,
'enable_terms_of_service': ENABLE_TERMS_OF_SERVICE,
'side_nav_footer_custom_html': SIDE_NAV_FOOTER_CUSTOM_HTML,
'about_dialog_custom_html': ABOUT_DIALOG_CUSTOM_HTML,
'enable_repo_auto_del': ENABLE_REPO_AUTO_DEL,
Expand Down
Empty file.
81 changes: 81 additions & 0 deletions seahub/privacy_policy/templates/privacy-policy/privacy-policy.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,81 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Privacy Policy</title>
<style>
body {
font-family: Arial, sans-serif;
line-height: 1.6;
margin: 20px;
}
h1, h2, h3 {
color: #333;
}
p {
margin-bottom: 10px;
}
ul {
margin-bottom: 20px;
}
</style>
</head>
<body>
<h1>Privacy Policy</h1>
<p>Welcome to our website. We value your privacy and are committed to protecting your personal information. Please read this Privacy Policy carefully to understand how we collect, use, disclose, and safeguard your information.</p>

<h2>1. Information We Collect</h2>
<p>We may collect and process the following types of personal information:</p>
<ul>
<li>Contact Information: such as name, email address, phone number, etc.</li>
<li>Account Information: such as username, password, etc.</li>
<li>Technical Information: such as IP address, browser type and version, time zone setting, operating system and platform, etc.</li>
<li>Usage Information: such as your browsing activities, click records, page stay time, etc.</li>
<li>Location Information: such as location data collected through IP address or other technologies.</li>
</ul>

<h2>2. How We Use Information</h2>
<p>We may use your personal information for the following purposes:</p>
<ul>
<li>To provide and maintain our services.</li>
<li>To improve our website and services.</li>
<li>To personalize your experience.</li>
<li>To process your requests and inquiries.</li>
<li>To communicate with you and send you service-related notifications.</li>
<li>To comply with legal obligations.</li>
</ul>

<h2>3. Disclosure of Information</h2>
<p>We do not sell or rent your personal information to third parties. We may disclose your information in the following situations:</p>
<ul>
<li>As required or permitted by law.</li>
<li>To protect our rights, property, or safety.</li>
<li>With our service providers who assist us in providing services and are bound by strict data protection requirements.</li>
</ul>

<h2>4. Protection of Information</h2>
<p>We implement appropriate technical and organizational measures to protect your personal information from unauthorized access, use, alteration, and disclosure.</p>

<h2>5. Your Rights</h2>
<p>Depending on the applicable privacy laws, you may have the following rights:</p>
<ul>
<li>The right to access your personal information.</li>
<li>The right to request correction of your personal information.</li>
<li>The right to request deletion of your personal information.</li>
<li>The right to restrict the processing of your personal information.</li>
<li>The right to object to the processing of your personal information.</li>
<li>The right to data portability.</li>
</ul>

<h2>6. Changes to Privacy Policy</h2>
<p>We may update this Privacy Policy from time to time. Any changes will be posted on this page with an updated revision date.</p>

<h2>7. Contact Us</h2>
<p>If you have any questions or concerns about our Privacy Policy, please contact us at:</p>
<p>Email: [email protected]</p>
<p>Phone: 123-456-7890</p>

<p>Last updated: August 6, 2024</p>
</body>
</html>
7 changes: 7 additions & 0 deletions seahub/privacy_policy/urls.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# Copyright (c) 2012-2016 Seafile Ltd.
from django.urls import path
from django.views.generic import TemplateView

urlpatterns = [
path('', TemplateView.as_view(template_name="privacy-policy/privacy-policy.html")),
]
7 changes: 4 additions & 3 deletions seahub/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -255,6 +255,8 @@
'seahub.profile',
'seahub.share',
'seahub.help',
'seahub.privacy_policy',
'seahub.terms_of_service',
'seahub.thumbnail',
'seahub.password_session',
'seahub.admin_log',
Expand Down Expand Up @@ -629,9 +631,8 @@ def genpassword():
# show 'log out' icon in top-bar or not.
SHOW_LOGOUT_ICON = False

# privacy policy link and service link
PRIVACY_POLICY_LINK = ''
TERMS_OF_SERVICE_LINK = ''
ENABLE_PRIVACY_POLICY = False
ENABLE_TERMS_OF_SERVICE = False

FILE_CONVERTER_SERVER_URL = 'http://127.0.0.1:8888'

Expand Down
16 changes: 8 additions & 8 deletions seahub/templates/snippets/policy_service_link.html
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
{% load i18n %}
{% if privacy_policy_link or terms_of_service_link %}
{% if enable_privacy_policy or enable_terms_of_service %}
<div class="privacy-policy-link">
{% if privacy_policy_link and terms_of_service_link %}
<a href="{{ privacy_policy_link }}" class="privacy-policy-link-text px-3">{% trans "Privacy Policy" %}</a>
{% if enable_privacy_policy and enable_terms_of_service %}
<a href="/privacy-policy/" target="_blank" class="privacy-policy-link-text px-3">{% trans "Privacy Policy" %}</a>
<span class="privacy-policy-link-split "></span>
<a href="{{ terms_of_service_link }}" class="privacy-policy-link-text px-3">{% trans "Terms of Service" %}</a>
{% elif privacy_policy_link %}
<a href="{{ privacy_policy_link }}" class="privacy-policy-link-text px-3">{% trans "Privacy Policy" %}</a>
{% elif terms_of_service_link %}
<a href="{{ terms_of_service_link }}" class="privacy-policy-link-text px-3">{% trans "Terms of Service" %}</a>
<a href="/terms-of-service/" target="_blank" class="privacy-policy-link-text px-3">{% trans "Terms of Service" %}</a>
{% elif enable_privacy_policy %}
<a href="/privacy-policy/" target="_blank" class="privacy-policy-link-text px-3">{% trans "Privacy Policy" %}</a>
{% elif enable_terms_of_service %}
<a href="/terms-of-service/" target="_blank" class="privacy-policy-link-text px-3">{% trans "Terms of Service" %}</a>
{% endif %}
</div>
{% endif %}
Empty file.
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Terms of Service</title>
<style>
body {
font-family: Arial, sans-serif;
line-height: 1.6;
margin: 20px;
}
h1, h2, h3 {
color: #333;
}
p {
margin-bottom: 10px;
}
ul {
margin-bottom: 20px;
}
</style>
</head>
<body>
<h1>Terms of Service</h1>
<p>Welcome to our website. By accessing or using our website, you agree to be bound by these Terms of Service. Please read them carefully.</p>

<h2>1. Acceptance of Terms</h2>
<p>By using our website, you accept and agree to comply with these Terms of Service. If you do not agree with these terms, you must not use our website.</p>

<h2>2. Changes to Terms</h2>
<p>We reserve the right to modify these Terms of Service at any time. Any changes will be effective immediately upon posting on this page. Your continued use of the website after any changes signifies your acceptance of the new terms.</p>

<h2>3. Use of the Website</h2>
<p>You agree to use our website only for lawful purposes and in a way that does not infringe the rights of, restrict, or inhibit anyone else's use and enjoyment of the website. Prohibited behavior includes harassing or causing distress or inconvenience to any other user, transmitting obscene or offensive content, or disrupting the normal flow of dialogue within our website.</p>

<h2>4. Intellectual Property</h2>
<p>All content on this website, including but not limited to text, graphics, logos, icons, images, and software, is the property of our website or its content suppliers and is protected by international copyright laws. You may not reproduce, distribute, or create derivative works from any content on this website without our prior written permission.</p>

<h2>5. User Content</h2>
<p>You are responsible for any content you post on our website. By submitting content, you grant us a non-exclusive, worldwide, royalty-free license to use, reproduce, modify, and distribute your content in any media. You agree not to post any content that is illegal, harmful, threatening, abusive, defamatory, vulgar, obscene, invasive of another's privacy, or otherwise objectionable.</p>

<h2>6. Termination</h2>
<p>We reserve the right to terminate or suspend your access to our website at any time, without notice, for conduct that we believe violates these Terms of Service or is harmful to other users of the website, us, or third parties, or for any other reason.</p>

<h2>7. Disclaimers and Limitation of Liability</h2>
<p>Our website is provided "as is" and "as available" without any warranties of any kind, either express or implied. We do not guarantee that our website will be available at all times or that it will be free from errors or viruses. In no event shall we be liable for any damages arising out of your use of the website.</p>

<h2>8. Governing Law</h2>
<p>These Terms of Service shall be governed by and construed in accordance with the laws of [Your Country/State], without regard to its conflict of law principles. Any legal actions arising out of or relating to these terms shall be filed exclusively in the courts located in [Your Jurisdiction].</p>

<h2>9. Contact Us</h2>
<p>If you have any questions or concerns about these Terms of Service, please contact us at:</p>
<p>Email: [email protected]</p>
<p>Phone: 123-456-7890</p>

<p>Last updated: August 6, 2024</p>
</body>
</html>
7 changes: 7 additions & 0 deletions seahub/terms_of_service/urls.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# Copyright (c) 2012-2016 Seafile Ltd.
from django.urls import path
from django.views.generic import TemplateView

urlpatterns = [
path('', TemplateView.as_view(template_name="terms-of-service/terms-of-service.html")),
]
2 changes: 2 additions & 0 deletions seahub/urls.py
Original file line number Diff line number Diff line change
Expand Up @@ -733,6 +733,8 @@
path('profile/', include('seahub.profile.urls')),
path('share/', include('seahub.share.urls')),
path('help/', include('seahub.help.urls')),
path('privacy-policy/', include('seahub.privacy_policy.urls')),
path('terms-of-service/', include('seahub.terms_of_service.urls')),
path('captcha/', include('captcha.urls')),
path('thumbnail/', include('seahub.thumbnail.urls')),
path('inst/', include(('seahub.institutions.urls', 'institutions'), namespace='institutions')),
Expand Down
Loading