mirror of
https://github.com/laurent22/joplin.git
synced 2025-04-01 21:24:45 +02:00
Server: Add terms and privacy page
This commit is contained in:
parent
75d79f373a
commit
db7b802803
packages/server
@ -49,8 +49,6 @@ table.table th .sort-button i {
|
||||
background-color: transparent;
|
||||
}
|
||||
|
||||
.footer .container {
|
||||
display: flex;
|
||||
justify-content: flex-end;
|
||||
.footer .content {
|
||||
opacity: 0.5;
|
||||
}
|
@ -37,6 +37,7 @@ export interface EnvVariables {
|
||||
STRIPE_WEBHOOK_SECRET?: string;
|
||||
|
||||
SIGNUP_ENABLED?: string;
|
||||
TERMS_ENABLED?: string;
|
||||
}
|
||||
|
||||
let runningInDocker_: boolean = false;
|
||||
@ -147,6 +148,7 @@ export async function initConfig(envType: Env, env: EnvVariables, overrides: any
|
||||
apiBaseUrl: env.API_BASE_URL ? env.API_BASE_URL : baseUrl,
|
||||
userContentBaseUrl: env.USER_CONTENT_BASE_URL ? env.USER_CONTENT_BASE_URL : baseUrl,
|
||||
signupEnabled: env.SIGNUP_ENABLED === '1',
|
||||
termsEnabled: env.TERMS_ENABLED === '1',
|
||||
...overrides,
|
||||
};
|
||||
}
|
||||
|
61
packages/server/src/routes/index/privacy.ts
Normal file
61
packages/server/src/routes/index/privacy.ts
Normal file
@ -0,0 +1,61 @@
|
||||
import { SubPath } from '../../utils/routeUtils';
|
||||
import Router from '../../utils/Router';
|
||||
import { RouteType } from '../../utils/types';
|
||||
import { AppContext } from '../../utils/types';
|
||||
import MarkdownIt = require('markdown-it');
|
||||
|
||||
const router: Router = new Router(RouteType.Web);
|
||||
router.public = true;
|
||||
|
||||
router.get('privacy', async (_path: SubPath, _ctx: AppContext) => {
|
||||
const markdownIt = new MarkdownIt();
|
||||
return markdownIt.render(`# Joplin Cloud Privacy Policy
|
||||
|
||||
## Who are we?
|
||||
|
||||
The Joplin Cloud web service is owned by Cozid Ltd, registered in England and Wales.
|
||||
|
||||
## What information do we collect?
|
||||
|
||||
In order to operate this service, the following user data is stored:
|
||||
|
||||
- Email (required)
|
||||
- Full name (optional)
|
||||
- Joplin synchronisation items.
|
||||
- Stripe user ID
|
||||
- Stripe subscription ID
|
||||
|
||||
Financial information is processed by a Stripe. We do not store financial information.
|
||||
|
||||
## How do we use personal information?
|
||||
|
||||
We use the email to authentify the user and allow them to login to the service and synchronise data with it. We also use it to send important emails, such as email verification or to recover a lost password. Occasionally, we may send important notifications to our users.
|
||||
|
||||
## What legal basis do we have for processing your personal data?
|
||||
|
||||
GDPR applies.
|
||||
|
||||
## When do we share personal data?
|
||||
|
||||
We treat personal data confidentially and will not share it with any third party.
|
||||
|
||||
## Where do we store and process personal data?
|
||||
|
||||
Personal data is stored securely in a Postgres database. Access to it is strictly controlled.
|
||||
|
||||
We may process the data for reporting purposes - for example, how many users use the service. How many requests per day, etc.
|
||||
|
||||
## How do we secure personal data?
|
||||
|
||||
A backup is made at regular intervals and stored on a secure server.
|
||||
|
||||
## How long do we keep your personal data for?
|
||||
|
||||
We keep your data for as long as you use the service. If you would like to stop using it and have your data deleted, please contact us. We will also consider automatic data deletion provided it can be done in a safe way.
|
||||
|
||||
## How to contact us?
|
||||
|
||||
Please contact us at [team@joplincloud.com](mailto:team@joplincloud.com) for any question.`);
|
||||
});
|
||||
|
||||
export default router;
|
41
packages/server/src/routes/index/terms.ts
Normal file
41
packages/server/src/routes/index/terms.ts
Normal file
@ -0,0 +1,41 @@
|
||||
import { SubPath } from '../../utils/routeUtils';
|
||||
import Router from '../../utils/Router';
|
||||
import { RouteType } from '../../utils/types';
|
||||
import { AppContext } from '../../utils/types';
|
||||
import MarkdownIt = require('markdown-it');
|
||||
|
||||
const router: Router = new Router(RouteType.Web);
|
||||
router.public = true;
|
||||
|
||||
router.get('terms', async (_path: SubPath, _ctx: AppContext) => {
|
||||
const markdownIt = new MarkdownIt();
|
||||
return markdownIt.render(`# **Joplin Cloud** usage terms and conditions
|
||||
|
||||
Welcome to our website. If you continue to browse and use this website, you are agreeing to comply with and be bound by the following terms and conditions of use, which together with our privacy policy govern Cozic Ltd’s relationship with you in relation to this website. Cozic Ltd is the owner of this website, Joplin Cloud. If you disagree with any part of these terms and conditions, please do not use our website.
|
||||
|
||||
The term ‘Joplin Cloud’ or ‘us’ or ‘we’ refers to the owner of the website whose registered office is Office #8 Frederick Street, Wigston, Leicester LE18 1PJ. Our company registration number is 06547799. The term ‘you’ refers to the user or viewer of our website.
|
||||
|
||||
The use of this website is subject to the following terms of use:
|
||||
|
||||
- The content of the pages of this website is for your general information and use only. It is subject to change without notice.
|
||||
|
||||
- This website uses cookies to save login session. If you do allow cookies to be used, you will not be able to login to the website.
|
||||
|
||||
- Neither we nor any third parties provide any warranty or guarantee as to the accuracy, timeliness, performance, completeness or suitability of the information and materials found or offered on this website for any particular purpose. You acknowledge that such information and materials may contain inaccuracies or errors and we expressly exclude liability for any such inaccuracies or errors to the fullest extent permitted by law.
|
||||
|
||||
- Your use of any information or materials on this website is entirely at your own risk, for which we shall not be liable. It shall be your own responsibility to ensure that any products, services or information available through this website meet your specific requirements.
|
||||
|
||||
- This website contains material which is owned by or licensed to us. This material includes, but is not limited to, the design, layout, look, appearance and graphics. Reproduction is prohibited other than in accordance with the copyright notice, which forms part of these terms and conditions.
|
||||
|
||||
- All trademarks reproduced in this website, which are not the property of, or licensed to the operator, are acknowledged on the website.
|
||||
|
||||
- Unauthorised use of this website may give rise to a claim for damages and/or be a criminal offence.
|
||||
|
||||
- From time to time, this website may also include links to other websites. These links are provided for your convenience to provide further information. They do not signify that we endorse the website(s). We have no responsibility for the content of the linked website(s).
|
||||
|
||||
- Your use of this website and any dispute arising out of such use of the website is subject to the laws of England, Northern Ireland, Scotland and Wales.
|
||||
|
||||
- Please contact us at [team@joplincloud.com](mailto:team@joplincloud.com) for any question.`);
|
||||
});
|
||||
|
||||
export default router;
|
@ -19,6 +19,8 @@ import indexSignup from './index/signup';
|
||||
import indexShares from './index/shares';
|
||||
import indexUsers from './index/users';
|
||||
import indexStripe from './index/stripe';
|
||||
import indexTerms from './index/terms';
|
||||
import indexPrivacy from './index/privacy';
|
||||
|
||||
import defaultRoute from './default';
|
||||
|
||||
@ -42,6 +44,8 @@ const routes: Routers = {
|
||||
'shares': indexShares,
|
||||
'users': indexUsers,
|
||||
'stripe': indexStripe,
|
||||
'terms': indexTerms,
|
||||
'privacy': indexPrivacy,
|
||||
|
||||
'': defaultRoute,
|
||||
};
|
||||
|
@ -4,6 +4,7 @@ import config from '../config';
|
||||
import { filename } from '@joplin/lib/path-utils';
|
||||
import { NotificationView } from '../utils/types';
|
||||
import { User } from '../db';
|
||||
import { makeUrl, UrlType } from '../utils/routeUtils';
|
||||
|
||||
export interface RenderOptions {
|
||||
partials?: any;
|
||||
@ -29,6 +30,8 @@ interface GlobalParams {
|
||||
owner?: User;
|
||||
appVersion?: string;
|
||||
appName?: string;
|
||||
termsUrl?: string;
|
||||
privacyUrl?: string;
|
||||
}
|
||||
|
||||
export function isView(o: any): boolean {
|
||||
@ -80,6 +83,8 @@ export default class MustacheService {
|
||||
prefersDarkEnabled: this.prefersDarkEnabled_,
|
||||
appVersion: config().appVersion,
|
||||
appName: config().appName,
|
||||
termsUrl: config().termsEnabled ? makeUrl(UrlType.Terms) : '',
|
||||
privacyUrl: config().termsEnabled ? makeUrl(UrlType.Privacy) : '',
|
||||
};
|
||||
}
|
||||
|
||||
|
@ -253,6 +253,8 @@ export function respondWithItemContent(koaResponse: any, item: Item, content: Bu
|
||||
export enum UrlType {
|
||||
Signup = 'signup',
|
||||
Login = 'login',
|
||||
Terms = 'terms',
|
||||
Privacy = 'privacy',
|
||||
}
|
||||
|
||||
export function makeUrl(urlType: UrlType): string {
|
||||
|
@ -79,6 +79,7 @@ export interface Config {
|
||||
apiBaseUrl: string;
|
||||
userContentBaseUrl: string;
|
||||
signupEnabled: boolean;
|
||||
termsEnabled: boolean;
|
||||
database: DatabaseConfig;
|
||||
mailer: MailerConfig;
|
||||
stripe: StripeConfig;
|
||||
|
@ -1,5 +1,5 @@
|
||||
<div class="footer">
|
||||
<div class="container">
|
||||
{{global.appName}} {{global.appVersion}}
|
||||
<div class="content has-text-centered">
|
||||
{{global.appName}} {{global.appVersion}}, copyright (C) 2021 Laurent Cozic.{{#global.termsUrl}} For more information, see the <a href="{{global.termsUrl}}">Terms of Use</a> and <a href="{{global.privacyUrl}}">Privacy Policy</a>{{/global.termsUrl}}
|
||||
</div>
|
||||
</div>
|
Loading…
x
Reference in New Issue
Block a user