Skip to content

Rework on filter to be able to have id=not_1|not_2 #72

@justinehell

Description

@justinehell

Describe the bug

We need to be able to have a server side filter with id=not_1|not_2.

Example: on RolePage, when we are on roles tab, and click on attach role button → inside the table in the dialog, we do not want to show the current role nor the SUPER_ADMINISTRATOR role.

Inside AttachAccessControlToAnotherDialog.vue

/**
 * Load roles and invoke the appropriate method from RoleService based on the entity value.
 * @returns {object} Object that contains role filters.
 */
async function loadRoles() {
  if (targetAccessControlType.value === 'role') {
    return RoleService.find({
      id: `not_${superAdministratorId.value}`, // here add |not_${accessControl.value.id}
      ...getFilters(),
    });
  }
 ...
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    BugSomething isn't working

    Type

    No type

    Projects

    Status

    🔖 Ready

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions