From 137536923dab71f9de900407c9b66dc4272203c4 Mon Sep 17 00:00:00 2001 From: Amy Gale Ruth Bowersox Date: Wed, 4 Mar 2026 22:18:57 -0700 Subject: [PATCH] added the Policy page --- config/config.go | 1 + config/default.yaml | 1 + main.go | 1 + top.go | 19 ++++++ ui/menudefs.yaml | 2 + ui/resources/policy.html | 106 ++++++++++++++++++++++++++++++++ ui/resources/useragreement.html | 4 +- ui/static/css/ams_style.css | 10 +++ ui/views/policy.jet | 19 ++++++ 9 files changed, 162 insertions(+), 1 deletion(-) create mode 100644 ui/resources/policy.html create mode 100644 ui/views/policy.jet diff --git a/config/config.go b/config/config.go index 95ac885..0ee0297 100644 --- a/config/config.go +++ b/config/config.go @@ -66,6 +66,7 @@ type AmConfig struct { LoginCookieAge int `yaml:"loginCookieAge"` SessionExpire string `yaml:"sessionExpire"` UserAgreementResource string `yaml:"userAgreementResource"` + PolicyResource string `yaml:"policyResource"` } `yaml:"site"` Database struct { Driver string `yaml:"driver"` diff --git a/config/default.yaml b/config/default.yaml index 1751f92..a881c4b 100644 --- a/config/default.yaml +++ b/config/default.yaml @@ -14,6 +14,7 @@ site: loginCookieAge: 365 sessionExpire: "3h" userAgreementResource: "useragreement.html" + policyResource: "policy.html" database: driver: "mysql" dsn: "amsdb:x00yes2k@tcp(localhost)/amsterdam?parseTime=true&loc=UTC" diff --git a/main.go b/main.go index 10541e2..9f9353e 100644 --- a/main.go +++ b/main.go @@ -72,6 +72,7 @@ func setupEcho() *echo.Echo { e.GET("/", ui.AmWrap(TopPage), uiset...) e.GET("/about", ui.AmWrap(AboutPage), uiset...) + e.GET("/policy", ui.AmWrap(PolicyPage), uiset...) e.GET("/login", ui.AmWrap(LoginForm), uiset...) e.POST("/login", ui.AmWrap(Login), uiset...) e.GET("/logout", ui.AmWrap(Logout), uiset...) diff --git a/top.go b/top.go index 1dd13fb..2f5e355 100644 --- a/top.go +++ b/top.go @@ -245,6 +245,25 @@ func AboutPage(ctxt ui.AmContext) (string, any) { return "framed", "about.jet" } +/* PolicyPage renders the policy page. + * Parameters: + * ctxt - The AmContext for the request. + * Returns: + * Command string dictating what to be rendered. + * Data as a parameter for the command string. + */ +func PolicyPage(ctxt ui.AmContext) (string, any) { + title, body, err := ui.AmLoadHTMLResource(config.GlobalConfig.Site.PolicyResource) + if err != nil { + return "error", err + } + + ctxt.VarMap().Set("title", title) + ctxt.VarMap().Set("body", body) + ctxt.SetFrameTitle(title) + return "framed", "policy.jet" +} + /* JumpToShortcut resolves "/go" links by redirecting them to the appropriate page. * Parameters: * ctxt - The AmContext for the request. diff --git a/ui/menudefs.yaml b/ui/menudefs.yaml index 4f53153..5a0f523 100644 --- a/ui/menudefs.yaml +++ b/ui/menudefs.yaml @@ -21,6 +21,8 @@ menudefs: title: "About This Site" permSet: "user" items: + - text: "Policy Page" + link: "/policy" - text: "Documentation" link: "/TODO/documentation" disabled: true diff --git a/ui/resources/policy.html b/ui/resources/policy.html new file mode 100644 index 0000000..ef395a3 --- /dev/null +++ b/ui/resources/policy.html @@ -0,0 +1,106 @@ + + + System Policy + + +

Our Policy on Message Copyright and Privacy

+

This is a "sample" policy page, intended as a default. Amsterdam sites are encouraged to provide their + own version of the policy page. To do this, set the externalResourcePath in the resources + section of the configuration file to a host directory, then place a file named policy.html + in that directory.

+ +

Message Copyright and Ownership

+

Your messages are your words, and you are responsible for them, as well as your overall behavior as a + member of the community. As a member of the community, you agree not to post messages that harass, solicit, + threaten, offend, embarrass or impersonate any other person or that disrupt the dialogue in the community, + or use this site to do any of the above. In addition, you agree not to post messages that violate other + persons' intellectual property, privacy or other rights.

+

When you post a message to this site, or to any community hosted on this Amsterdam server, you + grant the site the right to display your message on the page on which it was posted by you. It may + also be displayed on other pages on the site, or be reachable through searches or other means, but it will + always and only be here, on this server, and we have no intention of ever reusing, reprinting, or recreating + your message anywhere else. You lose no copyright to your words, and you are not beholden to us in any way, + shape, or form.

+

By posting here, you also grant us (the moderator(s) of the conference to which you post, the host and + cohost(s) of the community in which that conference is located, or the administrators of the site) the + right to remove your message if we choose not to want it here. We do not edit messages, except in extreme + cases of messages which include HTML or other characters that damage the usability of the site. We do + remove messages that are inappropriate or offensive to the admins. However, in the case of messages or + message attachments that contain copyrighted information or data that has been distributed in violation of + copyright, we are required by law to delete these messages if and when the legitimate copyright holder + contacts us, gives us the name and/or type of information that was posted and the location it was posted + to on this site, and requests that it be removed. This policy is the direct result of the United + States Digital Millennium Copyright Act, and neither this site nor the Amsterdam team is responsible + for this law or its effects.

+

The administrators of this site are not responsible for the accuracy or integrity of the information + contained in any messages posted to the site, and will not be held liable for any damages of any kind + incurred as the result of any message posted on this site. Some messages and site content may contain links + to sites on the Internet and World Wide Web other than this site itself. The administrators are + not responsible for the content of these other sites, and will not be held liable for any of their content.

+ +

Privacy Policy

+

When you create an account on this site, you supply us with certain pieces of personal information, + only some of which are required.

+

One of the most important of those is your E-mail address, which must be a functional Internet E-mail + address. This E-mail address is used by us to send a "confirmation number" that confirms that that E-mail + box is owned by you before granting you full privileges on the site. We also use it to send you "password + reminder" messages at your request. It may also be used by other registered site users to send you "quick + E-mail" messages, as a convenience. E-mail may also be sent to all members of a community, or all + participants in a conference or topic, by an administrator of the community, conference, or topic; each + of these E-mail messages contains these instructions as to how to stop receiving these mass E-mailed + notices: +

To stop receiving mass E-mailed notices from all Amsterdam community and conference hosts, + visit Amsterdam, click on the "Profile" link, check the box labeled "Don't send me mass E-mail from + community/conference hosts," and click Update to save this preference.
+

In no event will we sell, rent, or transfer your E-mail address to any third party, or link your E-mail + address to your other personal information, except through our own site (such as on your "user profile" + page, if you elect to display it).

+

Other personal information is only used to form your "user profile" page on the site. We + have no way of verifying the accuracy of this information, so you may enter anything you like. Beyond the + minimum required information, which is clearly identified on the account creation form, you may fill in + the fields or not, at your discretion.

+

To prevent unauthorized access, to maintain data accuracy, and to ensure the correct use of information, we + have put in place appropriate physical, electronic, and managerial procedures to safeguard and secure the + information we collect online.

+

This site will, in particular, not collect or maintain any personal information from individuals that + are known to us to be under the age of 13 years, and we do not design or structure this site to attract + anyone under the age of 13 years. Any account that is created by a person that we later determine to be + under the age of 13 will be deleted. This policy is a direct consequence of the United States Children's + Online Privacy Protection Act, and neither this site nor the Amsterdam team is responsible for this law + or its effects.

+

You can access all your account information by logging into the site and clicking on the + "Profile" link in the upper bar of the site. You can use the same page to modify, correct, or remove any + information in your profile, except that you may not remove any information marked as "required." (You + must be logged in to access your profile information.)

+ The site also logs "audit" information about certain actions that are performed on the site; these + audit records contain a timestamp, the user ID of the user performing the operation, the community in + which the operation was performed (where applicable), the Internet Protocol (IP) address from which the + request originated, and information identifying the specific nature of the audited action. These audit + records are accessible only to system administrators, and to community hosts (for actions performed within + their community only). They are intended to monitor the site operation and to provide administrators and + community hosts with a means of tracking actions that cause permanent modifications to the site or its + contents, including modifications that result in loss of data. They may also be used to trace disruptive + or malicious users to specific IP addresses.

+ +

Use of Cookies

+

This site uses browser "cookies" for precisely two purposes:

+
    +
  1. When you access the site, the Amsterdam software uses a cookie + to associate your browser with a "session" on the server, for the duration of your session. + This cookie is non-persistent, meaning it is not recorded to your computer's hard disk, but kept in the + memory of your browser, and it disappears when your browser session is closed.
  2. +
  3. If you elect to have the site remember your login (by explicitly checking the "Remember me for next + time" check box on the "Log In" dialog), the Amsterdam software will send you a persistent cookie that + contains authentication information to allow Amsterdam to recognize you on future site visits. This + cookie, in particular, does not contain your password; it uses a different authentication mechanism. + It is a persistent cookie, meaning that it is saved to your hard disk, but it has a maximum lifespan + of one year from the date on which it was issued, and you may remove it at any time by clicking the "Log Out" + link in the top bar of the site (which logs you out and removes the cookie; you may then log back in without + clicking "Remember me for next time," if desired). If you turn off persistent cookies in your browser, + or your browser does not support persistent cookies, you will not be able to use this feature, but that + will not affect the rest of the site's usability.
  4. +
+

Electric Minds does not share these cookies with any other site, and they contain no information which + would be meaningful to any other site.

+ + diff --git a/ui/resources/useragreement.html b/ui/resources/useragreement.html index bc8ab91..67483f5 100644 --- a/ui/resources/useragreement.html +++ b/ui/resources/useragreement.html @@ -4,7 +4,9 @@

This is a "sample" user agreement, intended as a default. Amsterdam sites are encouraged to provide their - own version of the user agreement.

+ own version of the user agreement. To do this, set the externalResourcePath in the resources + section of the configuration file to a host directory, then place a file named useragreement.html + in that directory.

By creating a user account, you agree to abide by the following rules regarding your conduct on our system. These rules may also be found as part of our Policy page.

Your messages are your words, and you are responsible for them, as well as your overall behavior as a diff --git a/ui/static/css/ams_style.css b/ui/static/css/ams_style.css index 421724c..1a5fc6c 100644 --- a/ui/static/css/ams_style.css +++ b/ui/static/css/ams_style.css @@ -14,3 +14,13 @@ div.amsDocument a { color: rgb(29 78 216); text-decoration: underline; } +div.amsDocument h2 { + font-size: 24px; + font-weight: 700; + line-height: calc(2 /1.5) +} +div.amsDocument h3 { + font-size: 18px; + font-weight: 700; + line-height: calc(1.75 /1.25) +} diff --git a/ui/views/policy.jet b/ui/views/policy.jet new file mode 100644 index 0000000..7c65c14 --- /dev/null +++ b/ui/views/policy.jet @@ -0,0 +1,19 @@ +{* + * Amsterdam Web Communities System + * Copyright (c) 2025-2026 Erbosoft Metaverse Design Solutions, All Rights Reserved + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at https://mozilla.org/MPL/2.0/. + *} +

+
+
+

{{ title }}

+
+
+ {{ body | raw }} +
+
+
+