Add Privacy Policy related improvements

various thing to make sure we're GDPR, et al compliant
This commit is contained in:
Kurt Hutten
2020-12-25 17:29:01 +11:00
parent 6623939f78
commit 7d262e9f58
51 changed files with 1480 additions and 95 deletions

View File

@@ -18,6 +18,7 @@ const CodeOfConductPage = () => {
lang="en-US"
/>
<div className="max-w-5xl mx-auto mt-20">
<h1 className="text-3xl">Code of Conduct</h1>
<h2 className="text-2xl font-ropa-sans py-4">What's Required</h2>
<ul className="list-disc pl-4">
<Li>

View File

@@ -0,0 +1,12 @@
import SubjectAccessRequestsLayout from 'src/layouts/SubjectAccessRequestsLayout'
import EditSubjectAccessRequestCell from 'src/components/EditSubjectAccessRequestCell'
const EditSubjectAccessRequestPage = ({ id }) => {
return (
<SubjectAccessRequestsLayout>
<EditSubjectAccessRequestCell id={id} />
</SubjectAccessRequestsLayout>
)
}
export default EditSubjectAccessRequestPage

View File

@@ -7,7 +7,7 @@ const UserPage = ({ userName }) => {
<MainLayout>
<Seo title={userName} description="Add new part page" lang="en-US" />
<EditUserCell userName={userName} />
<EditUserCell userName={userName} isEditable />
</MainLayout>
)
}

View File

@@ -4,7 +4,7 @@ import Seo from 'src/components/Seo/Seo'
const IdePartPage = ({ userName, partTitle }) => {
return (
<MainLayout>
<MainLayout shouldRemoveFooterInIde>
<Seo title={partTitle} description={partTitle} lang="en-US" />
<IdePartCell userName={userName} partTitle={partTitle} />

View File

@@ -0,0 +1,153 @@
import MainLayout from 'src/layouts/MainLayout'
import Seo from 'src/components/Seo/Seo'
import OutBound from 'src/components/OutBound'
const Li = ({ children }) => (
<li className="pb-2 font-roboto text-lg text-gray-800">{children}</li>
)
const P = ({ children }) => <p className="py-2">{children}</p>
const A = ({ to }) => <OutBound to={to}>{to}</OutBound>
const SubHeading = ({ children }) => <h3>{children}</h3>
const PrivacyPolicyPage = () => {
return (
<MainLayout>
<Seo
title={'Privacy Policy'}
description="Outlines CadHub's policy in regards to User's right to privacy"
lang="en-US"
/>
<div className="max-w-5xl mx-auto mt-20">
<h1 className="text-3xl">CadHub Privacy Policy</h1>
<P>
This Privacy Policy describes how your personal information is
collected, used, and shared when you visit or use{' '}
<A to="https://cadhub.xyz" /> (the Site).
</P>
<SubHeading>PERSONAL INFORMATION WE COLLECT</SubHeading>
<P>
When you visit the Site, we automatically collect certain information
about your device, including information about your web browser, IP
address, time zone, and some of the cookies that are installed on your
device. Additionally, as you browse the Site, we collect information
about the individual web pages that you view, what websites or search
terms referred you to the Site, and information about how you interact
with the Site. We refer to this automatically-collected information as
Device Information.
</P>
<P>We collect Device Information using the following technologies:</P>
<ul className="list-disc pl-4">
<Li>
Cookies are data files that are placed on your device or computer
and often include an anonymous unique identifier. For more
information about cookies, and how to disable cookies, visit
<A to="http://www.allaboutcookies.org" />.
</Li>
<Li>
Log files track actions occurring on the Site, and collect data
including your IP address, browser type, Internet service provider,
referring/exit pages, and date/time stamps.
</Li>
<Li>
Web beacons, tags, and pixels are electronic files used to
record information about how you browse the Site.
</Li>
</ul>
<P>
Additionally when you make an account or sign in to the app through
the Site, we collect certain information from you, including your
name, email address as well as any information you add to the website,
such as your profile bio, or "parts" you have added. We refer to this
information as Account Information.
</P>
<P>
When we talk about Personal Information in this Privacy Policy, we
are talking both about Device Information and Account Information.
</P>
<SubHeading>HOW DO WE USE YOUR PERSONAL INFORMATION?</SubHeading>
<P>
We use the Account Information that we collect generally to link you
to your account and the content you create through CadHub.xyz.
Additionally, we use this Account Information to communicate with you.
We use the Device Information that we collect to help us screen for
potential risk (in particular, your IP address), and more generally to
improve and optimize our Site (for example, by generating analytics
about how our customers browse and interact with the Site, and to
assess the success of our marketing and advertising campaigns).
</P>
<SubHeading>SHARING YOUR PERSONAL INFORMATION</SubHeading>
<P>
We share your Personal Information with third parties to help us use
your Personal Information, as described above. For example, we use
Netlify's idenity service to handle user logins and authentication --
you can read more about how Netlify uses your Personal Information
here: <A to="https://www.netlify.com/privacy/" /> --{' '}
<A to="https://www.netlify.com/gdpr-ccpa" />. We also use Google
Analytics to help us understand how our customers use the Site -- you
can read more about how Google uses your Personal Information here:{' '}
<A to="https://www.google.com/intl/en/policies/privacy/" />. You can
also opt-out of Google Analytics here:{' '}
<A to="https://tools.google.com/dlpage/gaoptout" />. We also use
MailChimp to send newsletters, You can read more about how MailChip
uses your Personal Information here:{' '}
<A to="https://mailchimp.com/legal/privacy/" />.
</P>
<P>
Finally, we may also share your Personal Information to comply with
applicable laws and regulations, to respond to a subpoena, search
warrant or other lawful request for information we receive, or to
otherwise protect our rights.
</P>
<SubHeading>DO NOT TRACK</SubHeading>
<P>
Please note that we do not alter our Sites data collection and use
practices when we see a Do Not Track signal from your browser.
</P>
<SubHeading>YOUR RIGHTS</SubHeading>
<P>
If you are a European resident, you have the right to access personal
information we hold about you and to ask that your personal
information be corrected, updated, or deleted. If you would like to
exercise this right, please contact us through the contact information
below.
</P>
<P>
Additionally, if you are a European resident we note that we are
processing your information in order to fulfill contracts we might
have with you (for example if you make an order through the Site), or
otherwise to pursue our legitimate business interests listed above.
Additionally, please note that your information will be transferred
outside of Europe, including to Australia, Canada and the United
States.
</P>
<SubHeading>DATA RETENTION</SubHeading>
<P>
When you place an create a "part" through the Site, we will keep this
record to become part of the public website, you can delete you parts
at anytime.
</P>
<SubHeading>CHANGES</SubHeading>
<P>
We may update this privacy policy from time to time in order to
reflect, for example, changes to our practices or for other
operational, legal or regulatory reasons.
</P>
<SubHeading>CONTACT US</SubHeading>
<P>
For more information about our privacy practices, if you have
questions, or if you would like to make a complaint, please contact us
by e-mail at{' '}
<a href="mailto:privacy@kurthutten.com">privacy@kurthutten.com</a> or
by mail using the details provided below:
</P>
<P>PO Box 462, Figtree, NSW, 2525, Australia</P>
</div>
</MainLayout>
)
}
export default PrivacyPolicyPage

View File

@@ -0,0 +1,7 @@
import PrivacyPolicyPage from './PrivacyPolicyPage'
export const generated = () => {
return <PrivacyPolicyPage />
}
export default { title: 'Pages/PrivacyPolicyPage' }

View File

@@ -0,0 +1,11 @@
import { render } from '@redwoodjs/testing'
import PrivacyPolicyPage from './PrivacyPolicyPage'
describe('PrivacyPolicyPage', () => {
it('renders successfully', () => {
expect(() => {
render(<PrivacyPolicyPage />)
}).not.toThrow()
})
})

View File

@@ -0,0 +1,12 @@
import SubjectAccessRequestsLayout from 'src/layouts/SubjectAccessRequestsLayout'
import SubjectAccessRequestCell from 'src/components/SubjectAccessRequestCell'
const SubjectAccessRequestPage = ({ id }) => {
return (
<SubjectAccessRequestsLayout>
<SubjectAccessRequestCell id={id} />
</SubjectAccessRequestsLayout>
)
}
export default SubjectAccessRequestPage

View File

@@ -0,0 +1,7 @@
import SubjectAccessRequestPage from './SubjectAccessRequestPage'
export const generated = () => {
return <SubjectAccessRequestPage />
}
export default { title: 'Pages/SubjectAccessRequestPage' }

View File

@@ -0,0 +1,11 @@
import { render } from '@redwoodjs/testing'
import SubjectAccessRequestPage from './SubjectAccessRequestPage'
describe('SubjectAccessRequestPage', () => {
it('renders successfully', () => {
expect(() => {
render(<SubjectAccessRequestPage />)
}).not.toThrow()
})
})

View File

@@ -0,0 +1,164 @@
import { useState, useEffect } from 'react'
import SubjectAccessRequestsCell from 'src/components/SubjectAccessRequestsCell'
import { Flash, useQuery, useMutation, useFlash } from '@redwoodjs/web'
import { Form, Submit } from '@redwoodjs/forms'
import MainLayout from 'src/layouts/MainLayout'
import Seo from 'src/components/Seo/Seo'
import InputTextForm from 'src/components/InputTextForm'
export const QUERY = gql`
query SUBJECT_ACCESS_REQUEST($userName: String!) {
userName(userName: $userName) {
id
userName
email
name
createdAt
updatedAt
image
bio
Parts {
id
title
description
code
mainImage
createdAt
updatedAt
deleted
}
Reaction {
id
emote
part {
id
title
}
createdAt
updatedAt
}
Comment {
id
text
part {
id
title
}
createdAt
updatedAt
}
SubjectAccessRequest {
id
comment
createdAt
updatedAt
}
}
}
`
const CREATE_SUBJECT_ACCESS_REQUEST_MUTATION = gql`
mutation CreateSubjectAccessRequestMutation(
$input: CreateSubjectAccessRequestInput!
) {
createSubjectAccessRequest(input: $input) {
id
comment
payload
userId
createdAt
updatedAt
}
}
`
const SubjectAccessRequestPage = () => {
const { addMessage } = useFlash()
const [input, setInput] = useState({})
const { data } = useQuery(QUERY, {
skip: !input.userName,
variables: { userName: input.userName },
})
const onSubmit = (input) => {
setInput(input)
}
const stringData = JSON.stringify(data?.userName)
const [createSubjectAccessRequest] = useMutation(
CREATE_SUBJECT_ACCESS_REQUEST_MUTATION,
{
onCompleted: () => {
addMessage('SubjectAccessRequest created.', {
classes: 'rw-flash-success',
})
},
}
)
useEffect(() => {
if (stringData) {
createSubjectAccessRequest({
variables: {
input: {
comment: input?.comment,
payload: stringData,
userId: data?.userName?.id,
},
},
})
}
}, [stringData])
return (
<MainLayout>
<Seo
title={'Subject Access Request'}
description="Code of Conduct"
lang="en-US"
/>
<section className="max-w-6xl mx-auto mt-20">
<SubjectAccessRequestsCell />
Here to fulfill a user's right to portability, before running this
please check that the query in
"pages/SubjectAccessRequestPage/SubjectAccessRequestPage.js" is
up-to-date.
<Form onSubmit={onSubmit}>
<div
className="grid items-center gap-2"
style={{ gridTemplateColumns: 'auto 1fr' }}
>
<span className="capitalize text-gray-500 text-sm align-middle my-3">
userName:
</span>
<InputTextForm
className="text-xl"
name="userName"
validation={{
required: true,
}}
/>
<div />
<div className="mt-10">
Please add how they made the request, who is fulling it (who you
are) and any other details
</div>
<span className="capitalize text-gray-500 text-sm align-middle my-3">
comment:
</span>
<InputTextForm
className="text-xl"
name="comment"
validation={{
required: true,
}}
/>
</div>
<Submit className="bg-indigo-200 text-indigo-800 p-2 px-4 shadow hover:shadow-lg mt-4 rounded">
Submit
</Submit>
</Form>
<pre className="whitespace-pre-wrap">{stringData}</pre>
</section>
</MainLayout>
)
}
export default SubjectAccessRequestPage

View File

@@ -1,5 +1,5 @@
import MainLayout from 'src/layouts/MainLayout'
import UserCell from 'src/components/UserCell'
import EditUserCell from 'src/components/EditUserCell'
import Seo from 'src/components/Seo/Seo'
const UserPage = ({ userName }) => {
@@ -7,7 +7,7 @@ const UserPage = ({ userName }) => {
<MainLayout>
<Seo title={userName} description="User page" lang="en-US" />
<UserCell userName={userName} />
<EditUserCell userName={userName} />
</MainLayout>
)
}