Line 6:
Line 6:
= Some requirements =
= Some requirements =
* Must be a Dolibarr module called "WebPortal"
* Must be a Dolibarr module called "WebPortal"
+
* Only 1 permission will be used : "Administer users of the customer/partner webportal module"
* The portal must be pages hosted into /public/webportal/
* The portal must be pages hosted into /public/webportal/
+
* Code must follow dolibarr development rules (https://wiki.dolibarr.org/index.php?title=Language_and_development_rules)
+
* Code for page list or crud classes must follow templates available into modulebuilder directory.
= Login =
= Login =
−
A table already exists to store login/pass for external portals.
+
A table, called llx_societe_account, already exists to store login/pass for external portals or external websites.
+
It is already used to store :
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 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
* 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 access too:
So we will also use it to store login for the external portal access too:
−
* the column "site" will contains "dolibarr_portal" and fk_soc will contains the id of the thirdparty
+
* the column "site" will contains "dolibarr_portal" and fk_soc will contains the id of the thirdparty. This column must appears into the form "Type of website" with possible "Web site (CMS Dolibarr)" if module website dolibarr is on, "Native Dolibarr portal" (if module webportal is on), ...
−
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.
+
+
On the record of a thirdparty, enabling 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.
Note: This tab already exists but is enabled only when WEBSITE_USE_WEBSITE_ACCOUNTS is on.