Skip to content

Commit

Permalink
fix actortype param
Browse files Browse the repository at this point in the history
  • Loading branch information
vkarpov15 committed Jun 17, 2024
1 parent ec880af commit 627aa38
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
7 changes: 6 additions & 1 deletion backend/tell.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,11 @@ const TellParams = new Archetype({
$required: true,
$enum: ['role', 'attribute']
},
actorType: {
$type: 'string',
$required: true,
$default: 'User'
},
userId: {
$type: 'string',
$validate: (v, type, doc) => assert.ok(v != null || doc.factType !== 'role')
Expand All @@ -38,7 +43,7 @@ const TellParams = new Archetype({
$validate: (v, type, doc) => assert.ok(v != null || doc.factType !== 'attribute')
},
attributeValue: {
$type: 'boolean',
$type: 'string',
$validate: (v, type, doc) => assert.ok(v != null || doc.factType !== 'attribute')
}
}).compile('TellParams');
Expand Down
2 changes: 1 addition & 1 deletion src/level/level.html
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@
<div class="bg-gray-50 shadow sm:rounded-lg mt-6">
<div class="px-4 py-5 sm:p-6">
<div v-show="level?.showAddRoleFact">
<add-role-fact></add-role-fact>
<add-role-fact :actorType="'User'"></add-role-fact>
</div>

<div v-show="level?.showAddAttributeFact">
Expand Down

0 comments on commit 627aa38

Please sign in to comment.