Skip to content

Commit

Permalink
reqAdmin on addExtModel
Browse files Browse the repository at this point in the history
  • Loading branch information
Cisphyx committed Nov 6, 2024
1 parent df90820 commit 046a486
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 0 deletions.
1 change: 1 addition & 0 deletions synapse/lib/stormlib/modelext.py
Original file line number Diff line number Diff line change
Expand Up @@ -227,6 +227,7 @@ async def getExtModel(self):
return await self.runt.snap.core.getExtModel()

async def addExtModel(self, model):
self.runt.reqAdmin()
model = await s_stormtypes.toprim(model)
return await self.runt.snap.core.addExtModel(model)

Expand Down
1 change: 1 addition & 0 deletions synapse/tests/test_cortex.py
Original file line number Diff line number Diff line change
Expand Up @@ -6195,6 +6195,7 @@ async def test_cortex_ext_model(self):
self.eq(['meta:taxonomy'], core.model.type('_test:type').info.get('interfaces'))

# manually edit in borked entries
core.exttypes.set('_type:bork', ('_type:bork', None, None, None))
core.extforms.set('_hehe:bork', ('_hehe:bork', None, None, None))
core.extedges.set(s_common.guid('newp'), ((None, '_does', 'newp'), {}))

Expand Down

0 comments on commit 046a486

Please sign in to comment.