Skip to content

Add support soft-delete for tables from 'plugins'  #5

@SvaRgoS

Description

@SvaRgoS

Is your feature request related to a problem? Please describe.

For all entities from api section softDelete works correctly.

But for @strapi/plugin-users-permissions
SofDelete didn't add the fields

_softDeletedAt: Attribute.DateTime & Attribute.Private;
_softDeletedById: Attribute.Integer & Attribute.Private;
_softDeletedByType: Attribute.String & Attribute.Private;

But for queries (update up_users) apply.

Describe the solution you'd like
in the strapi-plugin-soft-delete/utils/plugin.ts


export const supportsContentType = (uid?: string) => {
  return uid?.match(/^api::/) || false;// || !uid?.match(/^\w+::/) || false; // TODO: Deleting a compoment doesn't use the entityService
};

replace by


export const supportsContentType = (uid?: string) => {
  return uid?.match(/^api::/) || uid?.match(/^plugin::/) || false;// || !uid?.match(/^\w+::/) || false; // TODO: Deleting a compoment doesn't use the entityService
};

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions