# TEST: SECURITY-PM-04

## References

* [Security Policy Management](https://help.santesuite.org/installation/installation-1/deployment/installing-software/santedb-server/installation-qualification/security-administration-testing/test-cases-for-ui-1/security-policy-management-tests/broken-reference)

## Discussion

This is a basic test to demonstrate that the UI components appear and operate correctly when creating a new policy using duplicate records (duplicate OID and/or duplicate Name)

## Pre-Conditions / Setup

1. User must be logged into an account with policies granted for creating policies.
2. Navigate to **Administration Panel / Security / Policies / Index**.

## Actions/Steps

1- Click the **Create** button.

![](https://3421852694-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LZ0_pjgTp_kx4hqTZ3a%2F-Me2n1Q7m0XTCpoyC92G%2F-Me2nDJporNmicpoYkFX%2F1.jpg?alt=media\&token=16d18a6d-4658-460b-adbd-e11970467605)

2- Fill out all the fields appropriately and for the Name field, use a name with which a policy exists. (for example "Create-Policy-Test").

3- For the OID filed, use an OID with which a policy exists. (for example "1.3.6.1.4.1.3349.3.1.5.9.2.99.2").

## Expected Behaviour

1- Should navigate to the new Create Policy page.

![](https://3421852694-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LZ0_pjgTp_kx4hqTZ3a%2F-Me2n1Q7m0XTCpoyC92G%2F-Me2nLxJON-3pGD3pCF6%2Fdnld1.jpg?alt=media\&token=2b4a4a91-6772-4de8-a094-f75012bad63c)

2- Should show an error message below Name field indicating that duplicate record detected.

![](https://3421852694-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LZ0_pjgTp_kx4hqTZ3a%2F-Me2n1Q7m0XTCpoyC92G%2F-Me2ozS_5YV8EBYVHEwh%2F5.jpg?alt=media\&token=0ef24b83-b782-4ac4-bc51-ef130e992c32)

3- Should show an error message below OID field indicating that duplicate record detected.

![](https://3421852694-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LZ0_pjgTp_kx4hqTZ3a%2F-Me2n1Q7m0XTCpoyC92G%2F-Me2pxmQ1GTlOG3MhfqN%2F6.jpg?alt=media\&token=27d1a289-5254-4ec7-a1c5-c1ec99c35298)
