diff --git a/src/Vervis/Client.hs b/src/Vervis/Client.hs index 41e8518..2cc86ff 100644 --- a/src/Vervis/Client.hs +++ b/src/Vervis/Client.hs @@ -1273,12 +1273,12 @@ remove -> FedURI -> FedURI -> ExceptT Text Handler (Maybe HTML, [Aud URIMode], AP.Remove URIMode) -remove personID uRecipient uResourceCollabs = do +remove personID uRecipient uCollection = do theater <- asksSite appTheater env <- asksSite appEnv - let activity = AP.Remove uRecipient uResourceCollabs + let activity = AP.Remove uRecipient uCollection (resource, recipient) <- runActE $ parseRemove (Left $ LocalActorPerson personID) activity @@ -1291,9 +1291,7 @@ remove personID uRecipient uResourceCollabs = do manager <- asksSite appHttpManager coll <- ExceptT $ liftIO $ first T.pack <$> AP.fetchAPID manager AP.collectionId h luColl lu <- fromMaybeE (AP.collectionContext (coll :: AP.Collection FedURI URIMode)) "Remote topic collabs has no 'context'" - AP.ResourceWithCollections _ mluCollabs _ mluMembers <- ExceptT $ liftIO $ first (T.pack . show) <$> AP.fetchRWC manager h lu - unless (mluCollabs == Just luColl || mluMembers == Just luColl) $ - throwE "Remove origin isn't a collabs list" + AP.ResourceWithCollections _ _mluCollabs _ _mluMembers <- ExceptT $ liftIO $ first (T.pack . show) <$> AP.fetchRWC manager h lu return $ ObjURI h lu ) resource diff --git a/src/Vervis/Handler/Client.hs b/src/Vervis/Handler/Client.hs index 5fe9b92..0b98260 100644 --- a/src/Vervis/Handler/Client.hs +++ b/src/Vervis/Handler/Client.hs @@ -1578,8 +1578,8 @@ postPublishAcceptR = do redirect HomeR removeForm = renderDivs $ (,,) - <$> areq fedUriField "(URI) Whom to remove" Nothing - <*> areq fedUriField "(URI) From which resource collaborators collection" Nothing + <$> areq fedUriField "(URI) Whom to remove" Nothing + <*> areq fedUriField "(URI) From which collection" Nothing <*> areq capField "(URI) Grant activity to use for authorization" Nothing getPublishRemoveR :: Handler Html @@ -1587,7 +1587,7 @@ getPublishRemoveR = do ((_, widget), enctype) <- runFormPost removeForm defaultLayout [whamlet| -