Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

Version 1 Current »

Introduction

This document serves as a guide setting up and managing privacy policies and terms & conditions within the auth server.

Database Schema Overview

The database schema for managing privacy policies and terms & conditions consists of several key tables:

“servicecorelogin_privacy_policy”

Column Name

Data Type

Description

id

int (PK)

Unique identifier for each privacy policy entry.

language_code_identifier

int

Identifier for the language code of the policy.

html_content

varchar(4000)

HTML content of the privacy policy.

url

varchar(255)

URL pointing to the privacy policy document.

privacy_policy_version_id

int

Links to the privacy policy version.

“servicecorelogin_privacy_policy_approval”

Column Name

Data Type

Description

id

int (PK)

Unique identifier for each approval entry.

accept_date

datetime

Date and time when the policy was accepted.

privacy_policy_id

int

Links to the specific privacy policy that was accepted.

user_id

int

Identifier for the user who accepted the policy.

revoke_date

datetime

Date and time when the acceptance was revoked (if applicable).

“servicecorelogin_privacy_policy_version”

Column Name

Data Type

Description

id

int (PK)

Unique identifier for each version entry.

version_number

int

The version number of the privacy policy.

creation_date

datetime

Date and time when the version was created.

requires_approval

bit(1)

Indicates if the version requires user approval.

client_id

int

Identifier for the client the version is associated with.

“servicecorelogin_terms_and_conditions”

Column Name

Data Type

Description

id

int (PK)

Unique identifier for each terms and conditions entry.

html_content

varchar(4000)

HTML content of the terms and conditions.

url

varchar(255)

URL pointing to the terms and conditions document.

language_code_identifier

int

Identifier for the language code of the document.

terms_and_conditions_version_id

int

Links to the terms and conditions version.

“servicecorelogin_terms_and_conditions_approval”

Column Name

Data Type

Description

id

int (PK)

Unique identifier for each approval entry.

accept_date

datetime

Date and time when the terms were accepted.

terms_and_conditions_id

int

Links to the specific terms and conditions that were accepted.

user_id

int

Identifier for the user who accepted the terms.

revoke_date

datetime

Date and time when the acceptance was revoked (if applicable).

“servicecorelogin_terms_and_conditions_version”

Column Name

Data Type

Description

id

int (PK)

Unique identifier for each version entry.

version_number

int

The version number of the terms and conditions.

creation_date

datetime

Date and time when the version was created.

requires_approval

bit(1)

Indicates if the version requires user approval.

client_id

int

Identifier for the client the version is associated with.

Key Functionalities

Privacy Policies and Terms & Conditions Management

  • Adding and Updating Documents:

    • To add or update a privacy policy or terms & conditions document, insert or update records in the servicecorelogin_privacy_policy or servicecorelogin_terms_and_conditions tables.

    • Ensure each document is associated with the correct version by linking it to an entry in the corresponding version table.

  • Version Management:

    • When creating a new version of a document, add an entry to servicecorelogin_privacy_policy_version or servicecorelogin_terms_and_conditions_version.

    • Version numbers and creation dates help track changes and ensure users see the most current document.

  • User Acceptance Tracking:

    • Use servicecorelogin_privacy_policy_approval and servicecorelogin_terms_and_conditions_approval tables to track when users accept each document.

Setting Up ShowTermsAndConditions

Identify the Setting ID for ShowTermsAndConditions

Before updating the value, you need to find out the id of the ShowTermsAndConditionssetting in the servicecorelogin_setting table.

SELECT id, description 
FROM servicecorelogin_setting 
WHERE description = 'ShowTermsAndConditions';

Update the ShowTermsAndConditionsValue

To change the visibility of the Terms & Conditions, you'll need to update its value in the servicecorelogin_setting_value table. Let's assume you want to enable it (set to true).

UPDATE servicecorelogin_setting_value
SET value = 'true' -- Set to 'false' to hide the Terms & Conditions
WHERE setting_id = 41; -- Use the actual ID from the previous step

Setting Up ShowPrivacyPolicy

Identify the Setting ID for ShowPrivacyPolicy

Before updating the value, you need to find out the id of the ShowPrivacyPolicy setting in the servicecorelogin_setting table.

SELECT id, description 
FROM servicecorelogin_setting 
WHERE description = 'ShowPrivacyPolicy';

Update the ShowPrivacyPolicy Value

To change the visibility of the Privacy Policy, you'll need to update its value in the servicecorelogin_setting_value table. Let's assume you want to enable it (set to true).

UPDATE servicecorelogin_setting_value
SET value = 'true' -- Set to 'false' to hide the Privacy Policy
WHERE setting_id = 40; -- Use the actual ID from the previous step

  • No labels