Commit ac125b9b by Jan Hrabal

terms

parent 756ea1b4
......@@ -12,3 +12,269 @@ insert into TEMPLATE (ID, CODE, TEMPLATE) values (5, 'email.password.subject', '
insert into TEMPLATE (ID, CODE, TEMPLATE) values (6, 'email.password.text', 'Password text {{token}}');
insert into TEMPLATE (ID, CODE, TEMPLATE) values (7, 'email.password.html', 'Password HTML');
-- legal documents
insert into LEGAL_DOCUMENT (ID, CODE, LOCALE, CONTENT) values (1, 'AUTH.TERMS', '<p>By using the Inodio service you are
agreeing to be bound by the following terms and conditions ("Terms of Service"). IF YOU ARE
ENTERING INTO THIS AGREEMENT ON BEHALF OF A COMPANY OR OTHER LEGAL ENTITY, YOU REPRESENT THAT
YOU HAVE THE AUTHORITY TO BIND SUCH ENTITY, ITS AFFILIATES AND ALL USERS WHO ACCESS OUR SERVICES
THROUGH YOUR ACCOUNT TO THESE TERMS AND CONDITIONS, IN WHICH CASE THE TERMS "YOU" OR "YOUR"
SHALL REFER TO SUCH ENTITY, ITS AFFILIATES AND USERS ASSOCIATED WITH IT. IF YOU DO NOT HAVE SUCH
AUTHORITY, OR IF YOU DO NOT AGREE WITH THESE TERMS AND CONDITIONS, YOU MUST NOT ACCEPT THIS
AGREEMENT AND MAY NOT USE THE SERVICES.</p>
<p>Entity "JH" will further represent company "Jan Hrabal, Prostřední 2249, Zlín, Czech Republic. </p>
<p>If "JH" makes material changes to these Terms, we will notify you by email or by posting a
notice on our site before the changes are effective. Any new features that augment or enhance
the current Service, including the release of new tools and resources, shall be subject to the
Terms of Service. Continued use of the Service after any such changes shall constitute your
consent to such changes. You can review the most current version of the Terms of Service at any
time at: <a href="url">url</a></p>
<p>Violation of any of the terms below might result in the termination of your Account. While
"JH"
prohibits such conduct and Content on the Service, you understand and agree that "JH" cannot
be responsible for the Content posted on the Service and you nonetheless may be exposed to such
materials. You agree to use the Service at your own risk.</p>
<ol type="A">
<li><b>Account Terms</b>
<ol>
<li><p>You must be 13 years or older to use this Service.</p></li>
<li><p>You must be a human. Accounts registered by "bots" or other automated methods are not
permitted.</p></li>
<li><p>You must provide your name, a valid email address, and any other information requested in
order to complete the signup process.</p></li>
<li><p>You are responsible for maintaining the security of your account and password. "JH"
cannot and will not be liable for any loss or damage from your failure to comply with this
security obligation.</p></li>
<li><p>You are responsible for all Content posted and activity that occurs under your account
(even when Content is posted by others who have accounts under your account).</p></li>
<li><p>One person or legal entity may not maintain more than one free account.</p></li>
<li><p>You may not use the Service for any illegal or unauthorized purpose. You must not, in the
use of the Service, violate any laws in your jurisdiction (including but not limited to
copyright or trademark laws).</p></li>
</ol>
</li>
<li><b>API Terms</b>
<p>Customers may access their "JH" account data via an API (Application Program Interface). Any
use of the API, including use of the API through a third-party product that accesses "JH",
is
bound by these Terms of Service plus the following specific terms:</p>
<ol>
<li><p>You expressly understand and agree that "JH" shall not be liable for any direct,
indirect, incidental, special, consequential or exemplary damages, including but not limited
to, damages for loss of profits, goodwill, use, data or other intangible losses (even if
"JH" has been advised of the possibility of such damages), resulting from your use of
the
API or third-party products that access data via the API.</p></li>
<li><p>Abuse or excessively frequent requests to "JH" via the API may result in the
temporary
or permanent suspension of your account''s access to the API. "JH", in its sole
discretion,
will determine abuse or excessive usage of the API. "JH" will make a reasonable attempt
via email to warn the account owner prior to suspension.</p></li>
<li><p>"JH" reserves the right at any time to modify or discontinue, temporarily or
permanently, your access to the API (or any part thereof) with or without notice.</p></li>
</ol>
</li>
<!--li><b>Payment, Refunds, Upgrading and Downgrading Terms</b>
<ol>
<li><p>All paid plans must enter a valid payment account. Free accounts are not required to
provide payment account information.</p></li>
<li><p><strong>An upgrade from the free plan to any paying plan will immediately bill
you.</strong></p></li>
<li><p>For monthly payment plans, <strong>the Service is billed in advance on a monthly basis
and is non-refundable. There will be no refunds or credits for partial months of service,
upgrade/downgrade refunds, or refunds for months unused with an open account. In order to
treat everyone equally, no exceptions will be made.</strong></p></li>
<li><p>All fees are exclusive of all taxes excluding EU VAT, levies, or duties imposed by taxing
authorities, and
you shall be responsible for payment of all such taxes, levies, or duties.</p></li>
<li><p>For any upgrade or downgrade in plan level while on a monthly billing cycle, the credit
card that you provided will automatically be charged the new rate on your next billing
cycle.</p></li>
<li><p>Downgrading your Service may cause the loss of Content, features, or capacity of your
Account. "JH" does not accept any liability for such loss.</p></li>
</ol>
</li-->
<li><b>Cancellation and Termination</b>
<ol>
<li><p><strong>You are solely responsible for properly canceling your account</strong>
</p></li>
<li><p>All of your Content will be immediately deleted from the Service upon cancellation. This
information can not be recovered once your account is cancelled.</p></li>
<!--li><p>If you cancel the Service before the end of your current paid up month, your cancellation
will take effect immediately and you will not be charged again.</p></li-->
<li><p>"JH", in its sole discretion, has the right to suspend or terminate your account and
refuse any and all current or future use of the Service, or any other "JH" service, for
any reason at any time. Such termination of the Service will result in the deactivation or
deletion of your Account or your access to your Account, and the forfeiture and
relinquishment of all Content in your Account. "JH" reserves the right to refuse service
to anyone for any reason at any time.</p></li>
</ol>
</li>
<li><b>Modifications to the Service<!-- and Prices--></b>
<ol>
<li><p>"JH" reserves the right at any time and from time to time to modify or discontinue,
temporarily or permanently, the Service (or any part thereof) with or without notice.</p>
</li>
<!--li><p>Prices of all Services, including but not limited to monthly subscription plan fees to
the Service, are subject to change upon 30 days notice from us. Such notice may be provided
at any time by posting the changes to the Inodio Site (<a href="https://www.inodio.com">www.indoio.com</a>)
or the Service itself.</p></li-->
<li><p>"JH" shall not be liable to you or to any third-party for any modification,<!-- price
change,--> suspension or discontinuance of the Service.</p></li>
</ol>
</li>
<li><b>Copyright and Content Ownership</b>
<ol>
<li><p>You shall defend "JH" against any claim, demand, suit or proceeding made or
brought
against "JH" by a third-party alleging that Your Content, or Your use of the
Service in
violation of this Agreement, infringes or misappropriates the intellectual property rights
of a third-party or violates applicable law, and shall indemnify "JH" for any
damages
finally awarded against, and for reasonable attorney’s fees incurred by, "JH" in
connection with any such claim, demand, suit or proceeding; provided, that "JH" (a)
promptly gives You written notice of the claim, demand, suit or proceeding; (b) gives You
sole control of the defense and settlement of the claim, demand, suit or proceeding
(provided that You may not settle any claim, demand, suit or proceeding unless the
settlement unconditionally releases "JH" of all liability); and (c) provides to You all
reasonable assistance, at Your expense.</p></li>
<li><p>The look and feel of the Service is copyright ©2014 "JH" Inc. All rights reserved.
You
may not duplicate, copy, or reuse any portion of the HTML/CSS, Javascript, or visual design
elements or concepts without express written permission from "JH".</p></li>
</ol>
</li>
<li><b>General Conditions</b>
<ol>
<li><p>Your use of the Service is at your sole risk. The service is provided on an "as is" and
"as available" basis.</p></li>
<li><p>Support for "JH" services is only available in English, via email.</p></li>
<li><p>You understand that "JH" uses third-party vendors and hosting partners to
provide the
necessary hardware, software, networking, storage, and related technology required to run
the Service.</p></li>
<li><p>You must not modify, adapt or hack the Service or modify another website so as to falsely
imply that it is associated with the Service, "JH", or any other "JH"
service.</p></li>
<li><p>You agree not to reproduce, duplicate, copy, sell, resell or exploit any portion of the
Service, use of the Service, or access to the Service without the express written permission
by "JH".</p></li>
<li><p>We may, but have no obligation to, remove Content and Accounts containing Content that we
determine in our sole discretion are unlawful, offensive, threatening, libelous, defamatory,
pornographic, obscene or otherwise objectionable or violates any party''s intellectual
property or these Terms of Service.</p></li>
<li><p>Verbal, physical, written or other abuse (including threats of abuse or retribution) of
any "JH" customer, employee, member, or officer will result in immediate account
termination.</p></li>
<li><p>You understand that the technical processing and transmission of the Service, including
your Content, may be transferred unencrypted and involve (a) transmissions over various
networks; and (b) changes to conform and adapt to technical requirements of connecting
networks or devices.</p></li>
<li><p>You must not upload, post, host, or transmit unsolicited email, SMSs, or "spam"
messages.</p></li>
<li><p>You must not transmit any worms or viruses or any code of a destructive nature.</p></li>
<li><p>If your bandwidth usage significantly exceeds the average bandwidth usage (as determined
solely by "JH") of other "JH" customers, we reserve the right to immediately disable
your account or throttle your file hosting until you can reduce your bandwidth
consumption.</p></li>
<li><p>"JH" does not warrant that (i) the service will meet your specific requirements, (ii)
the service will be uninterrupted, timely, secure, or error-free, (iii) the results that may
be obtained from the use of the service will be accurate or reliable, (iv) the quality of
any products, services, information, or other material purchased or obtained by you through
the service will meet your expectations, and (v) any errors in the Service will be
corrected.</p></li>
<li><p>You expressly understand and agree that "JH" shall not be liable for any direct,
indirect, incidental, special, consequential or exemplary damages, including but not limited
to, damages for loss of profits, goodwill, use, data or other intangible losses (even if
"JH" has been advised of the possibility of such damages), resulting from: (i) the use
or
the inability to use the service; (ii) the cost of procurement of substitute goods and
services resulting from any goods, data, information or services purchased or obtained or
messages received or transactions entered into through or from the service; (iii)
unauthorized access to or alteration of your transmissions or data; (iv) statements or
conduct of any third-party on the service; (v) or any other matter relating to the
service.</p></li>
<li><p>The failure of "JH" to exercise or enforce any right or provision of the Terms of
Service shall not constitute a waiver of such right or provision. The Terms of Service
constitutes the entire agreement between you and "JH" and govern your use of the
Service,
superseding any prior agreements between you and "JH" (including, but not limited to,
any
prior versions of the Terms of Service). You agree that these Terms of Service and Your use
of the Service are governed under Czech law.</p></li>
</ol>
</li>
</ol>');
insert into LEGAL_DOCUMENT (ID, CODE, LOCALE, CONTENT) values (2, 'AUTH.PRIVACY', '<h1>Privacy Policy for Inodio</h1>
<p>At inodio.com, accessible from https://www.inodio.com, one of our main priorities is the privacy of our visitors. This Privacy Policy document contains types of information that is collected and recorded by inodio.com and how we use it.</p>
<p>If you have additional questions or require more information about our Privacy Policy, do not hesitate to contact us through email at info@inodio.com</p>
<h2>General Data Protection Regulation (GDPR)</h2>
<p>We are a Data Controller of your information.</p>
<p>Inodio legal basis for collecting and using the personal information described in this Privacy Policy depends on the Personal Information we collect and the specific context in which we collect the information:</p>
<ul>
<li>Inodio needs to perform a contract with you</li>
<li>You have given Inodio permission to do so</li>
<li>Processing your personal information is in Inodio legitimate interests</li>
<li>Inodio needs to comply with the law</li>
</ul>
<p>Inodio will retain your personal information only for as long as is necessary for the purposes set out in this Privacy Policy. We will retain and use your information to the extent necessary to comply with our legal obligations, resolve disputes, and enforce our policies. Our Privacy Policy was generated with the help of <a href="https://www.gdprprivacynotice.com/">GDPR Privacy Policy Generator</a>.</p>
<p>If you are a resident of the European Economic Area (EEA), you have certain data protection rights. If you wish to be informed what Personal Information we hold about you and if you want it to be removed from our systems, please contact us.</p>
<p>In certain circumstances, you have the following data protection rights:</p>
<ul>
<li>The right to access, update or to delete the information we have on you.</li>
<li>The right of rectification.</li>
<li>The right to object.</li>
<li>The right of restriction.</li>
<li>The right to data portability</li>
<li>The right to withdraw consent</li>
</ul>
<h2>Log Files</h2>
<p>inodio.com follows a standard procedure of using log files. These files log visitors when they visit websites. All hosting companies do this and a part of hosting services'' analytics. The information collected by log files include internet protocol (IP) addresses, browser type, Internet Service Provider (ISP), date and time stamp, referring/exit pages, and possibly the number of clicks. These are not linked to any information that is personally identifiable. The purpose of the information is for analyzing trends, administering the site, tracking users'' movement on the website, and gathering demographic information.</p>
<h2>Cookies and Web Beacons</h2>
<p>Like any other website, inodio.com uses ''cookies''. These cookies are used to store information including visitors'' preferences, and the pages on the website that the visitor accessed or visited. The information is used to optimize the users'' experience by customizing our web page content based on visitors'' browser type and/or other information.</p>
<h2>Privacy Policies</h2>
<P>You may consult this list to find the Privacy Policy for each of the advertising partners of inodio.com.</p>
<p>Third-party ad servers or ad networks uses technologies like cookies, JavaScript, or Web Beacons that are used in their respective advertisements and links that appear on inodio.com, which are sent directly to users'' browser. They automatically receive your IP address when this occurs. These technologies are used to measure the effectiveness of their advertising campaigns and/or to personalize the advertising content that you see on websites that you visit.</p>
<p>Note that inodio.com has no access to or control over these cookies that are used by third-party advertisers.</p>
<h2>Third Party Privacy Policies</h2>
<p>inodio.com''s Privacy Policy does not apply to other advertisers or websites. Thus, we are advising you to consult the respective Privacy Policies of these third-party ad servers for more detailed information. It may include their practices and instructions about how to opt-out of certain options. You may find a complete list of these Privacy Policies and their links here: Privacy Policy Links.</p>
<p>You can choose to disable cookies through your individual browser options. To know more detailed information about cookie management with specific web browsers, it can be found at the browsers'' respective websites. What Are Cookies?</p>
<h2>Children''s Information</h2>
<p>Another part of our priority is adding protection for children while using the internet. We encourage parents and guardians to observe, participate in, and/or monitor and guide their online activity.</p>
<p>inodio.com does not knowingly collect any Personal Identifiable Information from children under the age of 13. If you think that your child provided this kind of information on our website, we strongly encourage you to contact us immediately and we will do our best efforts to promptly remove such information from our records.</p>
<h2>Online Privacy Policy Only</h2>
<p>Our Privacy Policy applies only to our online activities and is valid for visitors to our website with regards to the information that they shared and/or collect in inodio.com. This policy is not applicable to any information collected offline or via channels other than this website.</p>
<h2>Consent</h2>
<p>By using our website, you hereby consent to our Privacy Policy and agree to its terms.</p>');
\ No newline at end of file
......@@ -206,4 +206,18 @@ CREATE TABLE CUSTOMIZABLE_TEMPLATE_LABEL (
CREATE INDEX CUSTOMIZABLE_TEMPLATE_LABEL_TEMPLATE_IDX ON CUSTOMIZABLE_TEMPLATE_LABEL(TEMPLATE_ID);
CREATE INDEX CUSTOMIZABLE_TEMPLATE_LABEL_UNIT_IDX ON CUSTOMIZABLE_TEMPLATE_LABEL(UNIT_ID);
-- LEGAL DOCUMENTS
CREATE TABLE LEGAL_DOCUMENT (
ID INT8 NOT NULL,
CODE VARCHAR(1000) NOT NULL,
LOCALE VARCHAR(10),
CONTENT VARCHAR,
CONSTRAINT PK_LEGAL_DOCUMENT PRIMARY KEY(ID)
);
CREATE INDEX LEGAL_DOCUMENT_IDX ON LEGAL_DOCUMENT(CODE, LOCALE);
-- TODO
\ No newline at end of file
package com.jh.boot.security.model;
package com.jh.boot.document;
import com.jh.boot.jpa.AbstractIdEntity;
......
package com.jh.boot.document;
import javax.persistence.Query;
import org.springframework.stereotype.Repository;
import org.springframework.util.StringUtils;
import com.jh.boot.jpa.AbstractHibernateRepository;
@Repository
public class LegalDocumentRepository extends AbstractHibernateRepository {
public LegalDocument findByCodeAndLocale(String code, String locale) {
if (code == null) {
return null;
}
if (!StringUtils.hasText(locale)) {
locale = "en";
}
locale = locale.replace("-", "_");
Query q = entityManager.createQuery("select ld from LegalDocument ld where lower(ld.code) = :code and lower(ld.locale) = :locale");
q.setParameter("code", locale.trim().toLowerCase());
q.setParameter("locale", locale.trim().toLowerCase());
LegalDocument ld = singleResult(q);
if (ld == null) {
if (locale.indexOf('_') > -1) {
return findByCodeAndLocale(code, locale.substring(0, locale.lastIndexOf('_')));
} else if (!"en".equalsIgnoreCase(locale)) {
return findByCodeAndLocale(code, "en");
}
}
return null;
}
}
package com.jh.boot.document;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
@Service
public class LegalDocumentService {
@Autowired
private LegalDocumentRepository repo;
@Transactional
public LegalDocument findByCodeAndLocale(String code, String locale) {
return repo.findByCodeAndLocale(code, locale);
}
}
......@@ -8,8 +8,7 @@ import java.util.ArrayList;
import java.util.Base64;
import java.util.Collections;
import java.util.List;
import java.util.Objects;
import java.util.logging.ErrorManager;
import java.util.Locale;
import javax.servlet.http.HttpSession;
......@@ -31,6 +30,8 @@ import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.web.bind.annotation.ResponseStatus;
import com.jh.boot.document.LegalDocument;
import com.jh.boot.document.LegalDocumentService;
import com.jh.boot.security.AppUserAuthentication;
import com.jh.boot.security.AuthError;
import com.jh.boot.security.AuthService;
......@@ -54,6 +55,10 @@ public class AuthApiController {
@Autowired
private AuthService authService;
@Autowired
private LegalDocumentService documentService;
@Value("${auth.controller.signup.enabled:true}")
private boolean signupEnabled;
......@@ -218,20 +223,17 @@ public class AuthApiController {
}
/*
@GetMapping("/auth/terms")
public @ResponseBody AppUser user() {
Authentication auth = SecurityContextHolder.getContext().getAuthentication();
if (auth instanceof AppUserAuthentication) {
return ((AppUserAuthentication) auth).getUser();
public @ResponseBody LegalDocument terms(Locale locale) {
return documentService.findByCodeAndLocale("AUTH.TERMS", locale.toLanguageTag());
}
//TODO other auth types?
return null;
}
@GetMapping("/auth/privacy")
public @ResponseBody LegalDocument privacy(Locale locale) {
return documentService.findByCodeAndLocale("AUTH.PRIVACY", locale.toLanguageTag());
}
*/
}
package com.jh.boot.security.repository;
import com.jh.boot.jpa.AbstractHibernateRepository;
public class LegalDocumentRepository extends AbstractHibernateRepository {
}
package com.jh.boot.security.service;
public class LegalDocumentService {
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment