Skip to content

Commit

Permalink
Role Mappings - change default 'realm' field option to 'realm.… (#55555)
Browse files Browse the repository at this point in the history
  • Loading branch information
legrego authored Jan 22, 2020
1 parent 5b641b7 commit 5d50141
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ const userFields = [
name: 'groups',
},
{
name: 'realm',
name: 'realm.name',
},
];

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,9 +44,9 @@ describe('JSONRuleEditor', () => {
new AnyRule([new FieldRule('username', '*')]),
new ExceptAnyRule([
new FieldRule('metadata.foo.bar', '*'),
new AllRule([new FieldRule('realm', 'special-one')]),
new AllRule([new FieldRule('realm.name', 'special-one')]),
]),
new ExceptAllRule([new FieldRule('realm', '*')]),
new ExceptAllRule([new FieldRule('realm.name', '*')]),
]),
onChange: jest.fn(),
onValidityChange: jest.fn(),
Expand All @@ -65,14 +65,14 @@ describe('JSONRuleEditor', () => {
any: [
{ field: { 'metadata.foo.bar': '*' } },
{
all: [{ field: { realm: 'special-one' } }],
all: [{ field: { ['realm.name']: 'special-one' } }],
},
],
},
},
{
except: {
all: [{ field: { realm: '*' } }],
all: [{ field: { ['realm.name']: '*' } }],
},
},
],
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -72,9 +72,9 @@ describe('VisualRuleEditor', () => {
new AnyRule([new FieldRule('username', '*')]),
new ExceptAnyRule([
new FieldRule('metadata.foo.bar', '*'),
new AllRule([new FieldRule('realm', 'special-one')]),
new AllRule([new FieldRule('realm.name', 'special-one')]),
]),
new ExceptAllRule([new FieldRule('realm', '*')]),
new ExceptAllRule([new FieldRule('realm.name', '*')]),
]),
maxDepth: 4,
onSwitchEditorMode: jest.fn(),
Expand Down

0 comments on commit 5d50141

Please sign in to comment.