Difference between revisions of "Draft:Specification Module Public Portal"

From Dolibarr ERP CRM Wiki
Jump to navigation Jump to search
Tag: 2017 source edit
Tag: 2017 source edit
Line 9: Line 9:
  
 
= Login =
 
= Login =
The portal module can show different information related to a thirdparty, a member of the foundation module, a contact.
+
A table already exists to store login/pass for external portals.
 +
It is already used to store :
 +
- login from external website (for example stripe customer key of a thirdparty). The column site contains "stripe".
 +
- login from website for users of a website. The column site contains "dolibarr_website" and we store the id of website into fk_website
 +
So we will also use it to store login for the external portal:
 +
- the column "site" will contains "dolibarr_portal" and fk_soc will contains the id of the thirdparty
 +
 
 +
On the record of a thirdparty, the module Public portal must enable the new tab will be visible to show all accounts/login (=record of table llx_societe_account) linked to this thirdparty.
 +
 
 +
Note: This tab already exists but is enabled only when WEBSITE_USE_WEBSITE_ACCOUNTS is on.
 +
We found this into core/lib/company.lib.php
 +
if (isModEnabled('website') && (!empty($conf->global->WEBSITE_USE_WEBSITE_ACCOUNTS)) && ($user->hasRight('societe', 'lire'))) {
 +
We must enable the tab also when the module ExtranetPortal is on.
  
 
= Setup page of the module =
 
= Setup page of the module =

Revision as of 13:22, 10 January 2023

Specification for a module of a Public Portal

We need a new module to offer a public portal


Some requirements

  • Must be a Dolibarr module
  • The portal must be pages hosted into /public/portal/

Login

A table already exists to store login/pass for external portals. It is already used to store : - login from external website (for example stripe customer key of a thirdparty). The column site contains "stripe". - login from website for users of a website. The column site contains "dolibarr_website" and we store the id of website into fk_website So we will also use it to store login for the external portal: - the column "site" will contains "dolibarr_portal" and fk_soc will contains the id of the thirdparty

On the record of a thirdparty, the module Public portal must enable the new tab will be visible to show all accounts/login (=record of table llx_societe_account) linked to this thirdparty.

Note: This tab already exists but is enabled only when WEBSITE_USE_WEBSITE_ACCOUNTS is on. We found this into core/lib/company.lib.php if (isModEnabled('website') && (!empty($conf->global->WEBSITE_USE_WEBSITE_ACCOUNTS)) && ($user->hasRight('societe', 'lire'))) { We must enable the tab also when the module ExtranetPortal is on.

Setup page of the module

The setup page must allow to enable features in the portal like:

  • Enable access to the membership record (Hidden / Visible or Editable)
  • Enable access to the partnership record

Other need will be added in the future...