Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Below is a list of services that are used within the plugin PACKAGED_Portals plugin for the portals feature.

Triggers

  • Portal :

  • Assets

APIs

  • Assign / Remove

...

1. Portal Object Trigger Service

...

  • Service Identifier: com.noheto.restapi.startup.ApiBusinessServiceStartup

    • Service Class: com.wedia.packaged.portals.extensions.PortalsCustomSection

  • Interface: com.noheto.extensions.interfaces.services.InstallableService

  • Description:
    This service extends the standard APIs provided by the WXM_RESTAPI plugin. It is mainly used to provide a $custom section when using DAM/DATA services on portal object in order to provide additional pieces of information for the front.

Security

From a security perspective, we observe standard security rules. Additionally, we assume that assigning an asset to a portal should be allowed when the user is allowed to update the target portal.

The default starter-kit configuration relies on permissions available / configurable based on the role type.

Role types default permissions

insert rules

Administrators and Contributors types are allowed to create portals

objectdata/insert/$anycreation

Code Block
NBCOMMONELEMENTS(',27,28,', surfer.roleid) > 0
AND
LOWER(objectname) = 'portal'

...

Other users can’t create portals

update rules

Administrators are allowed to update any portal

objectdata/insert/$anystatus/$anyowner

Code Block
NBCOMMONELEMENTS(',27,', surfer.roleid) > 0
AND
LOWER(objectname) = 'portal'

...

Other roles are allowed to update their portals and portals they are team members of :

objectdata/update/$anystatus/$selfowner

objectdata/update/$anystatus/$teammember

Code Block
LOWER(objectname) = 'portal'
AND
(
  object.owner = surfer.id
  OR
  NBCOMMONELEMENTS(object.team, surfer.id) > 0
)

View rules

Administrators are allowed to view any portal

objectdata/insert/$anystatus/$anyowner

Code Block
NBCOMMONELEMENTS(',27,', surfer.roleid) > 0
AND
LOWER(objectname) = 'portal'

...

Other roles are allowed to view their portals, portals they are team members of, portal they are members of viewers, internal portals and public portal :

objectdata/view/$online/$anyowner

objectdata/view/$public/$anyowner

objectdata/view/$anystatus/$selfowner

objectdata/view/$anystatus/$teammember

objectdata/view/$anystatus/$viewer

Code Block
LOWER(objectname) = 'portal'
AND
surfer.connected
AND
(
  object.status = 6
  OR
  object.private = 2
  OR
  object.owner = surfer.id
  OR
  NBCOMMONELEMENTS(object.team, surfer.id) > 0
  OR
  NBCOMMONELEMENTS(object.viewers, surfer.id) > 0
)

Extending portals

Adding metadata to the portal object