DB, S2S: Factory: Record set of allowed types
This commit is contained in:
parent
18bcfb88f2
commit
df4a2b221e
4 changed files with 21 additions and 2 deletions
|
@ -138,6 +138,13 @@ factoryCreateNew new now factoryMeID (Verse authorIdMsig body) detail = do
|
||||||
(newLocalResource, launchNewActor, sendInit, newResourceID) <-
|
(newLocalResource, launchNewActor, sendInit, newResourceID) <-
|
||||||
insertNewActor now name msummary createDB actorMeID
|
insertNewActor now name msummary createDB actorMeID
|
||||||
|
|
||||||
|
-- Verify this actor type is enabled
|
||||||
|
let allow NADeck = factoryAllowDeck
|
||||||
|
allow NAProject = factoryAllowProject
|
||||||
|
allow NATeam = factoryAllowTeam
|
||||||
|
unless (allow new factoryMe) $
|
||||||
|
throwE "I don't support this actor type"
|
||||||
|
|
||||||
-- Prepare forwarding the Create to my followers
|
-- Prepare forwarding the Create to my followers
|
||||||
factoryHash <- encodeKeyHashid factoryMeID
|
factoryHash <- encodeKeyHashid factoryMeID
|
||||||
let sieve =
|
let sieve =
|
||||||
|
|
|
@ -532,6 +532,9 @@ clientCreateFactory now personMeID (ClientMsg maybeCap localRecips remoteRecips
|
||||||
rid <- insert $ Resource aid
|
rid <- insert $ Resource aid
|
||||||
fid <- insert Factory
|
fid <- insert Factory
|
||||||
{ factoryResource = rid
|
{ factoryResource = rid
|
||||||
|
, factoryAllowDeck = True
|
||||||
|
, factoryAllowProject = True
|
||||||
|
, factoryAllowTeam = True
|
||||||
}
|
}
|
||||||
return (fid, rid, actorFollowers a)
|
return (fid, rid, actorFollowers a)
|
||||||
|
|
||||||
|
|
|
@ -3926,6 +3926,12 @@ changes hLocal ctx =
|
||||||
, removeField "Group" "create"
|
, removeField "Group" "create"
|
||||||
-- 664
|
-- 664
|
||||||
, removeField "Factory" "create"
|
, removeField "Factory" "create"
|
||||||
|
-- 665
|
||||||
|
, addFieldPrimRequired "Factory" True "allowDeck"
|
||||||
|
-- 666
|
||||||
|
, addFieldPrimRequired "Factory" True "allowProject"
|
||||||
|
-- 667
|
||||||
|
, addFieldPrimRequired "Factory" True "allowTeam"
|
||||||
]
|
]
|
||||||
|
|
||||||
migrateDB
|
migrateDB
|
||||||
|
|
|
@ -183,6 +183,9 @@ Komponent
|
||||||
|
|
||||||
Factory
|
Factory
|
||||||
resource ResourceId
|
resource ResourceId
|
||||||
|
allowDeck Bool
|
||||||
|
allowProject Bool
|
||||||
|
allowTeam Bool
|
||||||
|
|
||||||
UniqueFactory resource
|
UniqueFactory resource
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue