From 27a0b12a399e179530ab74c7648d4ab2693f1a0b Mon Sep 17 00:00:00 2001 From: Ian Lindsay <6673081+ilindsay@users.noreply.github.com> Date: Wed, 21 Aug 2024 09:21:04 +0100 Subject: [PATCH] feat: VOL-5305 add the new operator-tc user to validation for user creation (#86) --- src/Command/User/CreateUser.php | 1 + src/Command/User/UpdateUser.php | 1 + src/FieldType/Traits/RolesOptional.php | 2 +- test/Command/User/CreateUserTest.php | 1 + test/Command/User/UpdateUserTest.php | 1 + 5 files changed, 5 insertions(+), 1 deletion(-) diff --git a/src/Command/User/CreateUser.php b/src/Command/User/CreateUser.php index 00d5dae6..2177f794 100644 --- a/src/Command/User/CreateUser.php +++ b/src/Command/User/CreateUser.php @@ -89,6 +89,7 @@ final class CreateUser extends AbstractCommand * "internal-case-worker", * "internal-admin", * "internal-irhp-admin", + * "operator-tc", * "operator-admin", * "operator-user", * "operator-tm", diff --git a/src/Command/User/UpdateUser.php b/src/Command/User/UpdateUser.php index 6a9f836e..761102f3 100644 --- a/src/Command/User/UpdateUser.php +++ b/src/Command/User/UpdateUser.php @@ -97,6 +97,7 @@ final class UpdateUser extends AbstractCommand * "internal-case-worker", * "internal-admin", * "internal-irhp-admin", + * "operator-tc", * "operator-admin", * "operator-user", * "operator-tm", diff --git a/src/FieldType/Traits/RolesOptional.php b/src/FieldType/Traits/RolesOptional.php index ff2c597e..a108aeae 100644 --- a/src/FieldType/Traits/RolesOptional.php +++ b/src/FieldType/Traits/RolesOptional.php @@ -16,7 +16,7 @@ trait RolesOptional * @Transfer\Filter("Laminas\Filter\StringTrim") * @Transfer\Validator("Laminas\Validator\InArray", * options={ - * "haystack": {"internal-limited-read-only", "internal-read-only", "internal-case-worker", "internal-admin", "internal-irhp-admin", "operator-admin", "operator-user", "operator-tm", "partner-admin", "partner-user", "local-authority-admin", "local-authority-user", "system-admin"} + * "haystack": {"internal-limited-read-only", "internal-read-only", "internal-case-worker", "internal-admin", "internal-irhp-admin", "operator-tc", "operator-admin", "operator-user", "operator-tm", "partner-admin", "partner-user", "local-authority-admin", "local-authority-user", "system-admin"} * } * ) * @Transfer\Optional diff --git a/test/Command/User/CreateUserTest.php b/test/Command/User/CreateUserTest.php index 7e737396..120a1335 100644 --- a/test/Command/User/CreateUserTest.php +++ b/test/Command/User/CreateUserTest.php @@ -52,6 +52,7 @@ protected function getValidFieldValues() "internal-case-worker", "internal-admin", "internal-irhp-admin", + "operator-tc", "operator-admin", "operator-user", "operator-tm", diff --git a/test/Command/User/UpdateUserTest.php b/test/Command/User/UpdateUserTest.php index 457a3f68..384ec758 100644 --- a/test/Command/User/UpdateUserTest.php +++ b/test/Command/User/UpdateUserTest.php @@ -56,6 +56,7 @@ protected function getValidFieldValues() "internal-case-worker", "internal-admin", "internal-irhp-admin", + "operator-tc", "operator-admin", "operator-user", "operator-tm",