Skip to content

Comments

CHI-3566: Add contact field permission support#3901

Open
stephenhand wants to merge 13 commits intomasterfrom
CHI-3566-contact_field_view_permissions
Open

CHI-3566: Add contact field permission support#3901
stephenhand wants to merge 13 commits intomasterfrom
CHI-3566-contact_field_view_permissions

Conversation

@stephenhand
Copy link
Collaborator

Description

Adds support for loading contactField type permissions from the backend
Makes fields without view permissions hidden
Makes fields without edit permission read only

Checklist

  • Corresponding issue has been opened
  • New tests added
  • Feature flags added
  • Strings are localized
  • Tested for chat contacts
  • Tested for call contacts

Other Related Issues

None

Verification steps

AFTER YOU MERGE

  1. Cut a release tag using the Github workflow. Wait for it to complete and notify in the #aselo-deploys Slack channel.
  2. Comment on the ticket with the release tag version AND any additional instructions required to configure an environment to test the changes.
  3. Only then move the ticket into the QA column in JIRA

You are responsible for ensuring the above steps are completed. If you move a ticket into QA without advising what version to test, the QA team will assume the latest tag has the changes. If it does not, the following confusion is on you! :-P

@stephenhand stephenhand requested a review from gpaoloni February 16, 2026 14:24
@stephenhand
Copy link
Collaborator Author

@copilot Enhance the rules.test.ts in plugin-hrm-form to include specific tests for permissions with the contactField target kind

The additional tests should cover addtional scenarios including, but not limited to:

  • fields being checked that are not specified by a 'field' condition in any condition set are always allowed
  • condition sets that have no field condition will allow any field if they evaluate to true
  • if there are condition sets with no field condition that evaluate to false, but there are no condition sets that have a field condition matching the field being checked, the action should be allowes
  • Multiple field conditions in the same set specifying different fields means that condition set will always evaluate false, but can still be overridden by other condition sets evaluating to true in the usual way

Copy link
Contributor

Copilot AI commented Feb 16, 2026

@stephenhand I've opened a new pull request, #3912, to work on those changes. Once the pull request is ready, I'll request review from you.

@stephenhand
Copy link
Collaborator Author

@copilot Enhance the rules.test.ts in plugin-hrm-form to include specific tests for permissions with the contactField target kind

The additional tests should cover addtional scenarios including, but not limited to:

  • fields being checked that are not specified by a 'field' condition in any condition set are always allowed
  • condition sets that have no field condition will allow any field if they evaluate to true
  • if there are condition sets with no field condition that evaluate to false, but there are no condition sets that have a field condition matching the field being checked, the action should be allowes
  • Multiple field conditions in the same set specifying different fields means that condition set will always evaluate false, but can still be overridden by other condition sets evaluating to true in the usual way

Copy link
Contributor

Copilot AI commented Feb 16, 2026

@stephenhand I've opened a new pull request, #3913, to work on those changes. Once the pull request is ready, I'll request review from you.

Copilot AI and others added 5 commits February 16, 2026 17:12
Co-authored-by: stephenhand <1694716+stephenhand@users.noreply.github.com>
Co-authored-by: stephenhand <1694716+stephenhand@users.noreply.github.com>
Add comprehensive test coverage for contactField permission rules
…issions' into CHI-3566-contact_field_view_permissions
@stephenhand
Copy link
Collaborator Author

@copilot enhance permissions unit tests to add coverage for the new 'nobody' condition

Copy link
Contributor

Copilot AI commented Feb 18, 2026

@stephenhand I've opened a new pull request, #3917, to work on those changes. Once the pull request is ready, I'll request review from you.

Copilot AI and others added 2 commits February 18, 2026 10:07
… target kinds

Co-authored-by: stephenhand <1694716+stephenhand@users.noreply.github.com>
CHI-3566: Add 'nobody' condition test coverage for permission rules
Copy link
Collaborator

@gpaoloni gpaoloni left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me! Only having to change ContactDetailsSectionForm.tsx for all the changes to take effect is lovely to see.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants