Hi,
Attached patches for removing member in a collection from ifolder-ui.
Pl review.
Thanks,
Johnny
Index: LinuxClient/library/iFolderData.cs
===================================================================
--- LinuxClient/library/iFolderData.cs (revision 6510)
+++ LinuxClient/library/iFolderData.cs (working copy)
@@ -927,9 +927,11 @@
iFolderHolder ifHolder = null;
iFolderWeb ifolder = null;
- if(IsiFolder(ifolderID))
+ ifHolder = GetiFolder(ifolderID);
+ bool IsOwner = (domainController.GetDomain (ifHolder.iFolder.DomainID).MemberUserID.Equals (ifHolder.iFolder.OwnerID));
+
+ if(IsiFolder(ifolderID) && IsOwner)
{
- ifHolder = GetiFolder(ifolderID);
ifolder = ifHolder.iFolder;
if (ifolder.Role == null || ifolder.Role.Equals("Master"))
{
Index: WebService/iFolderService.cs
===================================================================
--- WebService/iFolderService.cs (revision 6510)
+++ WebService/iFolderService.cs (working copy)
@@ -1861,24 +1861,9 @@
[SoapDocumentMethod]
public void DeclineiFolderInvitation( string DomainID, string iFolderID )
{
-/* Store store = Store.GetStore();
-
- Simias.POBox.POBox poBox =
- Simias.POBox.POBox.GetPOBox( store, DomainID );
-
- // iFolders returned in the Web service are also
- // Subscriptions and it ID will be the subscription ID
- Node node = poBox.GetNodeByID(iFolderID);
- if(node == null)
- throw new Exception("Invalid iFolderID");
-
- Subscription sub = new Subscription(node);
-
- // Change the local subscription
- sub.SubscriptionState = SubscriptionStates.Replied;
- sub.SubscriptionDisposition = SubscriptionDispositions.Declined;
-
- poBox.Commit(sub);*/
+ Store store = Store.GetStore ();
+ Domain domain = store.GetDomain(DomainID);
+ DiscoveryFramework.RemoveMembership (DomainID, iFolderID);
}
Index: server/DiscoveryWS/DiscoveryService.asmx.cs
===================================================================
--- server/DiscoveryWS/DiscoveryService.asmx.cs (revision 6746)
+++ server/DiscoveryWS/DiscoveryService.asmx.cs (working copy)
@@ -360,12 +360,13 @@
Collection collection = Store.GetStore().GetCollectionByID( CollectionID );
Member member = collection.GetMemberByID( UserID );
- CatalogEntry entry = Catalog.GetEntryByCollectionID( CollectionID );
+// CatalogEntry entry = Catalog.GetEntryByCollectionID( CollectionID );
if ( member != null )
{
- entry.RemoveMember(member.UserID);
-// collection.Commit( collection.Delete( member ) );
+ //Note : When collection is deleted, information in catalog will be updated.
+// entry.RemoveMember(member.UserID);
+ collection.Commit( collection.Delete( member ) );
return true;
}
return false;
_______________________________________________
ifolder-dev mailing list
[email protected]
http://forge.novell.com/mailman/listinfo/ifolder-dev