Overview
Every user need to Accept the terms and conditions in order to access the portal:
...
Changes to user table
Column | Changes |
---|---|
tncaccepteddatetncacceptedon | Added - will store latest tnc accepted date |
tncversion | added - will store latest tnc accepted version |
...
Admin has to update the system settings table for applicable channel , for new tncVersion to be impacted.
[
{tncConfig{
latestVersion=v2,
"channelName":"NameOfChannel 1",v2{
"tncVersion": "v2.0"url=htmllink
},
v1{
"channelName":"NameOfChannel 2", url=htmllink
"tncVersion" : "v1.0"
}
}
]
Changes
...
to
...
existing
...
API
GET /user/v1/read/:uid
→ Will add following keys to the response:
showTnC: true or false
tncAcceptedDatetncAcceptedOn: informational purpose
tncAcceptedVersion: informational purpose
→ showTnC tncLatestVersion: Latest version to be accepted by user.
tncLatestVersionUrl: link to HTML page.
promptTnC: true or false
→ promptTnC is true → user will not be prompted for terms & conditions acceptance page.
→ showTnc → promptTnC is false → user will not be propmted for terms & conditions acceptance page
...
- Accept TnC
POST /user/v1/tnc/accept{ "request": {
"version" : "v2" } }
Note: Version will be identified from System settings. system settings will have identifier as "tncConfiguration" that will hold terms and condition version and other details. User Id will be taken from "x-authenticated-user-token".
Response
200 OK - Terms & conditions accepted successfully
...