EntityCrudValidator

This extension is allowing you to avoid actions (Add, update, delete) on a selected entity type by using the native inRiver user roles.

In our opinion, the most important action to avoid is the Channel Delete. It has happened in the past to our clients that a new PIM user has deleted a channel by mistake because he’s still catching up the solution. The Channel entity is an important piece in the product life cycle. Removing this piece will break workflows. Since inRiver doesn’t have a “Trash”, it’s impossible to restore a deleted entity. So we need to create a new Channel entity and:

  1. Reconfigure all Channel Listener connectors so it’s listening to all actions done in the new channel.

  2. Rebuild the category navigation that was under the deleted channel in the new channel.

  3. If there were some fields on the Channel level, we need to remember what was saved on the deleted channel to reconfigure it on the new channel.

In summary, a lot of manual steps, bad time/money investments and many broken workflows for a certain time.

How to use it

  1. Create permissions within the Control Center (See below in Permission Nomenclature for more details)

  2. Assign those permissions to a role (Preferably a super admin)

  3. Assign this (or those) role(s) to the desired users (Again, preferably a super admin)

  4. Create the extension (See below in Extension configuration for more details)

  5. Fill the extension setting with the list of permissions to validate (See below for more details)

  6. Reload extension settings

  7. To test it within the portal, you need to logout and login to have the latest permissions assigned to your user

Permission Nomenclature

The permission name is simple as a concatenation of the Action that you want to validate and the EntityTypeId, all Pascal case.

Examples:

  • AddChannel - Only users with that permission will be able to add channels.

  • DeleteChannel - Only users with that permission will be able to delete channels

  • DeleteChannelNode - Only users with that permission will be able to delete channelNodes

  • UpdateResource - Only users with that permission will be able to update resources

Extension configuration

When adding the extension in the control center

  • Extension Id: Whatever you may want

  • Package: The zip package above

  • Assembly Name: Absolunet.InRiver.ServerExtension.EntityCrudValidator.dll

  • Assembly Type: Absolunet.InRiver.ServerExtension.EntityCrudValidator.EntityCrudValidatorExtension

  • Extension Type: ServerExtension

Extension settings

Settings

Example

Description

Comments

Settings

Example

Description

Comments

PermissionsToCheck

AddChannel,DeleteChannel,UpdateChannel

List of permissions to validate separated by a comma.

Mandatory
Default Value: DeleteChannel

Test Function

The extension validates that all settings are properly filled and there must be at least one permission to validate. Also, it validates that:

  • All permissions exist in the model

  • The operation name must be Add, Update and Delete only.

  • The entityTypeId must exists in the model

If it returns false, check in the logs, you may have more details.

Note

Actions made to entities within an extension can’t be validated by this extension since these actions are made by the system user.