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

CMS: Terms and demo #730

Closed
josecelano opened this issue Sep 13, 2024 · 1 comment · Fixed by #731
Closed

CMS: Terms and demo #730

josecelano opened this issue Sep 13, 2024 · 1 comment · Fixed by #731
Labels
- User - Enjoyable to Use our Software Enhancement / Feature Request Something New High Priority Focus Required Legal Licenses and other Official Documents
Milestone

Comments

@josecelano
Copy link
Member

josecelano commented Sep 13, 2024

Relates to: torrust/torrust-index-gui#617

Context

We need to include legal information in the web app. The info will be provided by the API. Ideally, we should build a proper CMS, but since we don't want to postpone the version 3.0.0 release, we will use config values to allow users to easily customize those texts.

Temporary Solution

Add new config values for static content about terms (Usage Policies and Content Restrictions)

[website]
name = "Torrust"

# The app will run in demo mode if this section is provided. For now, that means to include a top banner with this warning.
[website.demo]
warning = """
⚠️ Please be aware: This demo resets all data weekly. Torrents not complying with our Usage Policies will be removed immediately without notice. We encourage the responsible use of this software in compliance with all legal requirements.
"""

[website.terms]

# The text for the checkbox in the upload torrent form.
[website.terms.upload]
content_upload_agreement = """
"I confirm that the content I am uploading is authorized, and I have read and agree to the [Usage Policies](./terms)."
"""

[website.terms.page]
title = "Usage Policies and Content Restrictions"
content = """
Our software is designed to support the distribution of legal, authorized content only. Users may only upload or share files that fall under the following categories:

- **Open-Source Licenses:** Content licensed under recognized open-source licenses, allowing for free distribution and modification.
- **Creative Commons Licenses:** Content released under Creative Commons licenses that permit sharing and distribution.
- **Public Domain:** Content that is free of copyright restrictions and available for public use.

**Prohibited Content:** Any content that infringes copyright, is subject to copyright protection, or is illegal under applicable laws is strictly prohibited. This includes but is not limited to copyrighted movies, music, software, books, and any other media.

**Enforcement:** We reserve the right to remove any content that does not comply with these policies without notice. We may also take additional steps, including reporting violations to the relevant authorities, if necessary.
"""

NOTES

We did something similar this for the casbin configuration #702

However, that is app configuration not content.

cc @da2ce7 @cgbosse @mario-nt

@josecelano josecelano added this to the v3.0.0 milestone Sep 13, 2024
@josecelano josecelano added Enhancement / Feature Request Something New - User - Enjoyable to Use our Software Legal Licenses and other Official Documents High Priority Focus Required labels Sep 13, 2024
josecelano added a commit to josecelano/torrust-index that referenced this issue Sep 13, 2024
We need to pass legal texts to the frontent but we don't have a proper
CMS. For now, we have just added the texts in the configuration to make
it possible for users to overrride them. These are the new values in the
config:

```toml
[website.demo]
warning = "⚠️ Please be aware: This demo resets all data weekly. Torrents not complying with our Usage Policies will be removed immediately without notice. We encourage the responsible use of this software in compliance with all legal requirements."

[website.terms]

[website.terms.upload]
content_upload_agreement = """I confirm that the content I am uploading is authorized, and I have read and agree to the terms."""

[website.terms.page]
content = """

Our software is designed to support the distribution of legal, authorized content only. Users may only upload or share files that fall under the following categories:

- **Open-Source Licenses:** Content licensed under recognized open-source licenses, allowing for free distribution and modification.
- **Creative Commons Licenses:** Content released under Creative Commons licenses that permit sharing and distribution.
- **Public Domain:** Content that is free of copyright restrictions and available for public use.

**Prohibited Content:** Any content that infringes copyright, is subject to copyright protection, or is illegal under applicable laws is strictly prohibited. This includes but is not limited to copyrighted movies, music, software, books, and any other media.

**Enforcement:** We reserve the right to remove any content that does not comply with these policies without notice. We may also take additional steps, including reporting violations to the relevant authorities, if necessary.

"""
title = "Usage Policies and Content Restrictions"
```
@josecelano josecelano linked a pull request Sep 13, 2024 that will close this issue
josecelano added a commit to josecelano/torrust-index that referenced this issue Sep 15, 2024
We need to pass legal texts to the frontent but we don't have a proper
CMS. For now, we have just added the texts in the configuration to make
it possible for users to overrride them. These are the new values in the
config:

```toml
[website.demo]
warning = "⚠️ Please be aware: This demo resets all data weekly. Torrents not complying with our Usage Policies will be removed immediately without notice. We encourage the responsible use of this software in compliance with all legal requirements."

[website.terms]

[website.terms.upload]
content_upload_agreement = """I confirm that the content I am uploading is authorized, and I have read and agree to the terms."""

[website.terms.page]
content = """

Our software is designed to support the distribution of legal, authorized content only. Users may only upload or share files that fall under the following categories:

- **Open-Source Licenses:** Content licensed under recognized open-source licenses, allowing for free distribution and modification.
- **Creative Commons Licenses:** Content released under Creative Commons licenses that permit sharing and distribution.
- **Public Domain:** Content that is free of copyright restrictions and available for public use.

**Prohibited Content:** Any content that infringes copyright, is subject to copyright protection, or is illegal under applicable laws is strictly prohibited. This includes but is not limited to copyrighted movies, music, software, books, and any other media.

**Enforcement:** We reserve the right to remove any content that does not comply with these policies without notice. We may also take additional steps, including reporting violations to the relevant authorities, if necessary.

"""
title = "Usage Policies and Content Restrictions"
```
josecelano added a commit to josecelano/torrust-index that referenced this issue Sep 15, 2024
We need to pass legal texts to the frontent but we don't have a proper
CMS. For now, we have just added the texts in the configuration to make
it possible for users to overrride them. These are the new values in the
config:

```toml
[website.demo]
warning = "⚠️ Please be aware: This demo resets all data weekly. Torrents not complying with our Usage Policies will be removed immediately without notice. We encourage the responsible use of this software in compliance with all legal requirements."

[website.terms]

[website.terms.upload]
content_upload_agreement = """I confirm that the content I am uploading is authorized, and I have read and agree to the terms."""

[website.terms.page]
content = """

Our software is designed to support the distribution of legal, authorized content only. Users may only upload or share files that fall under the following categories:

- **Open-Source Licenses:** Content licensed under recognized open-source licenses, allowing for free distribution and modification.
- **Creative Commons Licenses:** Content released under Creative Commons licenses that permit sharing and distribution.
- **Public Domain:** Content that is free of copyright restrictions and available for public use.

**Prohibited Content:** Any content that infringes copyright, is subject to copyright protection, or is illegal under applicable laws is strictly prohibited. This includes but is not limited to copyrighted movies, music, software, books, and any other media.

**Enforcement:** We reserve the right to remove any content that does not comply with these policies without notice. We may also take additional steps, including reporting violations to the relevant authorities, if necessary.

"""
title = "Usage Policies and Content Restrictions"
```
josecelano added a commit that referenced this issue Sep 15, 2024
7d82eb2 feat: [#730] add CMS content to configration (Jose Celano)

Pull request description:

  We need to pass legal texts to the frontent but we don't have a proper CMS. For now, we have just added the texts in the configuration to make it possible for users to overrride them. These are the new values in the config:

  ```toml
  [website.demo]
  warning = "⚠️ Please be aware: This demo resets all data weekly. Torrents not complying with our Usage Policies will be removed immediately without notice. We encourage the responsible use of this software in compliance with all legal requirements."

  [website.terms]

  [website.terms.upload]
  content_upload_agreement = """I confirm that the content I am uploading is authorized, and I have read and agree to the terms."""

  [website.terms.page]
  title = "Usage Policies and Content Restrictions"
  content = """

  Our software is designed to support the distribution of legal, authorized content only. Users may only upload or share files that fall under the following categories:

  - **Open-Source Licenses:** Content licensed under recognized open-source licenses, allowing for free distribution and modification.
  - **Creative Commons Licenses:** Content released under Creative Commons licenses that permit sharing and distribution.
  - **Public Domain:** Content that is free of copyright restrictions and available for public use.

  **Prohibited Content:** Any content that infringes copyright, is subject to copyright protection, or is illegal under applicable laws is strictly prohibited. This includes but is not limited to copyrighted movies, music, software, books, and any other media.

  **Enforcement:** We reserve the right to remove any content that does not comply with these policies without notice. We may also take additional steps, including reporting violations to the relevant authorities, if necessary.

  """
  ```

ACKs for top commit:
  josecelano:
    ACK 7d82eb2

Tree-SHA512: 708aceea4457df03e5bbcc1f2e6b61d521e68db1ce45b962a78d62be297ff94119614c0c11c21f03915d8db8dbddde1ed530da0176a280ec8152854e268e4b47
josecelano added a commit to torrust/torrust-index-gui that referenced this issue Sep 15, 2024
562dd29 fix: [#621] using a linked package isntead of NPM regsitry (Jose Celano)
92a3d48 feat: [#619] add demo warning banner (Jose Celano)

Pull request description:

  Add demo warning banner. The text can be overridden in the Index configuration:

  ```
  [website.demo]
  warning = """
  ⚠️ Please be aware: This demo resets all data weekly. Torrents not complying with our Usage Policies will be removed immediately without notice. We encourage the responsible use of this software in compliance with all legal requirements.
  """
  ```

  See torrust/torrust-index#730

ACKs for top commit:
  josecelano:
    ACK 562dd29

Tree-SHA512: 113c59e13dc5537f96dea3dac21fbae6f0ecc663c1d451db90f8c300c774e5c6f2868da191d4094ce229573b499ce9619df94e5f791da3ac047a4f3311542a8f
@josecelano
Copy link
Member Author

Notice the [demo] section in the TOML file follows the same convention as the [registration]:

# ...
[demo]
# ...
[registration]
# ...

If the section is present, then it's enabled, meaning the demo mode is enabled when the configuration contains the [demo] section. In previous versions of the configuration for other sections we were using an explicit field enabled like this:

# ...
[demo]
enabled = true
# ...
[registration]
enabled = true
# ...

We decided to change it to not force the user to add that section when they don't need it. The final config file is shorter and clearer. However, I've just realized that it's not possible to enable the section by just using env vars. The configuration is loaded from the TOML file and merged with env vars. Env vars only allow overriding final values. It's impossible to add a new section when it's not present in the initial configuration. That could be a problem in the containerized environment where you maybe want to use only env vars. Anyway, since we allow injecting the whole TOML file as an env var, that env var can be used to define these empty sections to enable them.

cc @da2ce7

josecelano added a commit that referenced this issue Sep 24, 2024
867a1f5 release: version 3.0.0-rc.1 (Jose Celano)
cdf2fe3 fix: chedck error (Jose Celano)
5e0226d chore(deps): update dependencies (Jose Celano)
7d82eb2 feat: [#730] add CMS content to configration (Jose Celano)
0f3d122 chore(deps): update dependencies (Jose Celano)
69a463a chore(deps): udpate dependencies (Jose Celano)
8246f07 feat: min and max password length should be also valid (Jose Celano)
2e67cc1 fix: [#613] wrong error message for password too long error (Jose Celano)
bc28ac7 develop: bump to version 3.0.0-rc.1-develop (Jose Celano)

Pull request description:

  Release Version 3.0.0-rc.1

ACKs for top commit:
  josecelano:
    ACK 867a1f5

Tree-SHA512: f304ae58451017faf56b285562bb445894637a43fb64bf6ec8f61cbd9fb34e28faa59b9023f4e0cff0d38c373383e0fb6222a534ac02fecda81c54f72560f383
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
- User - Enjoyable to Use our Software Enhancement / Feature Request Something New High Priority Focus Required Legal Licenses and other Official Documents
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant