Main contributors: Robin Jones, last modified: 2008-09-26

My First Stab at a framework for Terms of service support:


-- New Table to store Terms Of service information

CREATE TABLE TermsOfService (
     TOS_id text NOT NULL,                        -- ID
     name text NOT NULL,                          -- Friendly Name Of Terms Of Service (seen in admin interface)
     url text,                                    -- URL of Terms Of Service
     Version integer DEFAULT 1,                   -- Version Number (will alert user if terms updated)

-- New Table to store weather the user has accepted the Terms Of service  
-- (supports the ability to goto different Nodes with different TOS)

CREATE TABLE TOS_Accepted_Users (
     user_id                                      -- User Id
     TOS_Accepted boolean DEFAULT false,          -- Gives the ability to manually reset Users TOS Status
     TOS_id text NOT NULL,                        -- the TOS that the user agreed to (there maybe many)
     Version integer NOT NULL,                    -- TOS Version Number (stored when user agreed to TOS)

ALTER TABLE networks ( 
     Default_TOS text,                            -- If set will default all new nodes to this TOS
     Node_can_change_TOS boolean DEFAULT true,    --If false will use above on all network nodes

ALTER TABLE nodes ( 
     TOS_id text,                                 -- If set users logging onto node will have to agree to set TOS

when the users login is processed, the the following SQL query will be performed

(needs work but i need to remember how i am going to acheive this) SELECT * FROM TOS_Accepted_Users WHERE user_id = CurrentUser? LIMIT BY 1

Some thoughts by gbastien

Added: september 10, 2009

Here's an attempt to summarize what can be found about the term Of Services from mailing list discussions

There are many scenarios involving the TOS. One must be able to specify some rules

  1. Whether or not the TOS must be shown
  2. When (once, every time)
  3. To whom (Can this be linked somehow with a profile? Different profiles can have different TOS with different rules)
  4. How to deal with multiple versions
  5. Is the TOS per node, per network
  6. Should the user accept it explicitly (Agree button) or implicitly (just show the TOS)
  7. Handle multiple languages
  8. A way to see the TOS any time, not just in an acceptance context

The above schema deals with 4 and 5, behavior can be added to get 1 (don't show if networks.default_TOS is null) and 8 (hookMenu of the network to add a new link to the TOS)

There is also Dave's idea to make the TOS a contentType to be added to the contentLibrary, we add rules 7 and 3, but we lose possibilities for 6 and 8

I handled it by using the HTMLeditor plug in to create an HTML "Terms of use page" that is added to the reusable content library. I included language that says "By Creating an account and logging in to this network you, the user, are agreeing to the terms of use listed here in." and then continue to list the terms of use. Then I placed that content on the Login page for the Network. Granted the user doesn't have to click a seperate check box to accept the terms, but by placing this on the login page, they are accepting the terms each time they login by the act of logging in. Which is nice because if your terms of use change, they're automatically accepting the new change the next time they authenticate.