Skip to content

Commit

Permalink
fix(rbac): fix validation mistake
Browse files Browse the repository at this point in the history
Signed-off-by: Oleksandr Andriienko <oandriie@redhat.com>
  • Loading branch information
AndrienkoAleksandr committed Jan 28, 2024
1 parent 77457ef commit c3cca34
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions plugins/rbac-backend/src/service/policies-validation.ts
Original file line number Diff line number Diff line change
Expand Up @@ -114,8 +114,8 @@ async function validateGroupingPolicy(
roleMetadataStorage: RoleMetadataStorage,
source: Source,
) {
if (groupPolicy.length === 3) {
throw new Error(`Group policy should has length 3`);
if (groupPolicy.length !== 2) {
throw new Error(`Group policy should has length 2`);
}

const member = groupPolicy[0];
Expand Down

0 comments on commit c3cca34

Please sign in to comment.