S2S: Person: Revoke: Fix bug: Forgot to delete PermitExtendResource*

This commit is contained in:
Pere Lev 2024-04-27 13:20:06 +03:00
parent 476f65aece
commit d24492bf44
No known key found for this signature in database
GPG key ID: 5252C5C863E5E57D

View file

@ -1235,12 +1235,16 @@ personRevoke now recipPersonID (Verse authorIdMsig body) (AP.Revoke lus) = do
let extendIDs = map (permitTopicExtendLocalPermit . entityVal) extends
extendLocalIDs = map entityKey extends
deleteWhere [PermitTopicExtendLocalId <-. extendLocalIDs]
deleteWhere [PermitTopicExtendResourceLocalPermit <-. extendIDs]
deleteWhere [PermitTopicExtendResourceRemotePermit <-. extendIDs]
deleteWhere [PermitTopicExtendId <-. extendIDs]
Right (_, enableID) -> do
extends <- selectList [PermitTopicExtendRemoteTopic ==. enableID] []
let extendIDs = map (permitTopicExtendRemotePermit . entityVal) extends
extendRemoteIDs = map entityKey extends
deleteWhere [PermitTopicExtendRemoteId <-. extendRemoteIDs]
deleteWhere [PermitTopicExtendResourceLocalPermit <-. extendIDs]
deleteWhere [PermitTopicExtendResourceRemotePermit <-. extendIDs]
deleteWhere [PermitTopicExtendId <-. extendIDs]
deleteBy $ UniquePermitPersonSendDelegator gestureID
case topicAndEnable of
@ -1267,6 +1271,8 @@ personRevoke now recipPersonID (Verse authorIdMsig body) (AP.Revoke lus) = do
case extend of
Left k -> delete k
Right k -> delete k
deleteBy $ UniquePermitTopicExtendResourceLocal extendID
deleteBy $ UniquePermitTopicExtendResourceRemote extendID
delete extendID
)