Appearance
Portals ​
Overview ​
A portal (brand portal) is a DamInstance row in dam_instances: the external site a workspace uses to distribute assets to partners. Each portal has a brand_name, a url (a slug on the shared portal frontend, or a custom domain when is_domain = 1), logo, favicon, JSON settings, is_slider, is_active and is_public_portal. A workspace can have up to workspaces.max_instances portals.
Partners are DealerUsers (the dam-api guard). Access to a portal is a DamInstancesUsers row with instance_status = 1. What a partner sees is controlled per portal by DamInstancePermission rows on assets, folders and collages:
visibility | Meaning |
|---|---|
0 | Public: shown in this portal |
1 | Private |
2 | Protected: folder is navigable because something beneath it is public, but not published itself |
| no row | Private |
The rules live in App\Services\DAM\FolderVisibilityRecalculator, which change-permission, move, folder delete, archive and restore use to recompute ancestor folders deepest first.
Admin API (/api/v1/digital-assets/instance/*, tile/*, permission/*, dealer/*) manages portals. The Portal API (/dam/v1) serves them to partners. Portal login is covered in Authentication.
Endpoints ​
Admin API (/api/v1/digital-assets) ​
| Method | Path | Controller@method | Purpose |
|---|---|---|---|
| GET | /instance/get, /instance/instance-list, /instance/detail | DamInstanceController@getInstance, @getInstanceList, @getDetail | Read portals |
| POST | /instance/create | DamInstanceController@create | Create a portal |
| POST | /instance/update | DamInstanceController@update | Update name, URL, domain, logo, favicon, active flag |
| PUT | /instance/update-settings | DamInstanceController@updateSettings | Merge keys into settings JSON |
| POST | /instance/change-portal-visibility | DamInstanceController@changePortalVisibility | Make a portal public or private |
| POST | /instance/create-user, /instance/update-user | DamInstanceController@createUser, @updateUser | Invite or edit a partner |
| GET | /instance/get-user, /instance/get-user-details, /instance/user-activity | DamInstanceController@getUserByInstanceId, @getUserDetail, @userActivity | Partner lists and activity |
| POST | /instance/delete-restore-user, /instance/delete-user | DamInstanceController@deleteOrRestoreUser, @deleteUser | Deactivate, restore or delete a partner |
| POST | /instance/user-resend-invitation, /instance/revoke-invitation | DamInstanceController@resendUserInvitation, @revokeUserInvitation | Invitation management |
| POST | /instance/dealer-activate | DamInstanceController@activateDealerUser | Activate a partner |
| GET POST | /instance/banner/all, /create, /update, /update-ordering, /delete | InstanceBannerController | Portal banners |
| GET POST PATCH DELETE | /tile/list, /create, /update, /update-order, /update-slider-config, /delete | DamTilesController | Portal home tiles |
| POST | /permission/change-permission | DamPermissionController@changePermission | Publish or unpublish assets, folders and collages per portal |
| POST | /permission/bulk-instance-visibility | DamPermissionController@bulkInstanceVisibility | Current per-portal visibility of a selection |
| GET POST | /dealer/*, /dealer/user/* | DealerController | Dealers (App\Models\LM\Dealer) and their users |
Portal API (/dam/v1) ​
| Method | Path | Controller@method | Purpose |
|---|---|---|---|
| POST | /check-public-portal | AuthController@checkPublicPortalLogin | Public portal sign-in by URL (throttle:30,1) |
| POST | /verify-domain | DashboardController@verifyDomain | Resolve a custom domain |
| GET | /digital/common-data | DashboardController@getAllCommonData | Portal home data |
| GET | /digital/get-tiles, /digital/get-banners | DashboardController@getTiles, @getBanners | Active tiles and banners by position |
| GET | /digital/trending-recent-assets, /digital/all-popular-data | DashboardController@getTrendingOrRecentAssets, @getAllPopularData | Home page lists |
| GET | /digital/check-account-status | DashboardController@checkAccountStatus | Partner account status |
| POST | /digital/instance/update-user | DashboardController@updateUser | Partner edits their profile |
Folder, collage and asset reads are listed in Folders, Collages and Assets. The full visibility rules are in Permissions and Portal Visibility.
Workflows ​
Create a portal ​
update re-sends the CNAME email when a custom domain is turned on or changed, and validates uniqueness against other portals. update-settings and change-portal-visibility look the portal up by instance_id only; they do not call checkUser or check the workspace.
Public portal switch ​
A public portal works by sharing one anonymous partner account per portal. Since PR #453 POST /dam/v1/check-public-portal signs the visitor in as that account in one call and returns the normal login payload plus url and id; it never returns the account's email or password (the old endpoint did, and the frontend then called /dam/v1/login). The anonymous account cannot change its password (403) or profile from the portal. See Authentication: portal sign-in link and public portal.
Invite a partner ​
The invitation link points to https://{custom domain}/{workspace}/generate-password?invitation_token= or DAM_FRONTEND_URL/{portal url}/generate-password?...; the partner sets a password through POST /dam/v1/generate-password. Pending partners get instance_status = 0 until they accept. delete-restore-user toggles all of a partner's portal rows: active rows are set to status 0 and soft deleted, otherwise they are restored.
Publish content to portals ​
instance_ids must be present (an empty list makes the items private everywhere) and each id must exist. Each id list is capped at 5000. Only live assets and existing folders and collages receive new rows. If inline reindexing fails, asset ids are queued through ReindexAssetsByIds. bulk-instance-visibility returns, per portal, which of the given asset_ids and folder_ids are public, for the admin dialog.
Partner reads the portal ​
Tiles need title, url and an image (jpeg, png, jpg, gif, svg, 2 MB). Banners need image and image_name and reject images over 20 MB. All tile and banner admin endpoints require the manage_banner_and_tiles plan feature. tile/update-slider-config sets is_slider on the portal.
Data ​
| Model / table | Use |
|---|---|
DamInstance / dam_instances | Portals |
DamInstancesUsers / dam_instances_users | Partner access per portal |
DealerUsers / dealer_users | Partners, including the anonymous public user |
DealerUserInvitations | Invitation tokens |
DamInstancePermission / dam_instance_permissions | Per-portal visibility rows (polymorphic permissionable_type) |
DamTile / dam_tiles, InstanceBanner / instance_banners | Home page content |
WorkspaceBranding | Branding created with a portal |
Dealer (App\Models\LM\Dealer) | Dealer companies |
Related ​
- Authentication, Folders, Collages, Search for
instance_visibility - Middleware for
dam-api, Portal API routes - Frontend: Portals, Permissions & Access