Author: mflorea Date: 2008-01-30 14:37:28 +0100 (Wed, 30 Jan 2008) New Revision: 7197
Modified: xwiki-products/curriki/trunk/plugins/invitationmanager/src/main/java/org/xwiki/plugin/invitationmanager/plugin/InvitationManagerPluginApi.java Log: CURRIKI-1499: No way to remove old or dead invitations in a group Modified: xwiki-products/curriki/trunk/plugins/invitationmanager/src/main/java/org/xwiki/plugin/invitationmanager/plugin/InvitationManagerPluginApi.java =================================================================== --- xwiki-products/curriki/trunk/plugins/invitationmanager/src/main/java/org/xwiki/plugin/invitationmanager/plugin/InvitationManagerPluginApi.java 2008-01-30 13:16:39 UTC (rev 7196) +++ xwiki-products/curriki/trunk/plugins/invitationmanager/src/main/java/org/xwiki/plugin/invitationmanager/plugin/InvitationManagerPluginApi.java 2008-01-30 13:37:28 UTC (rev 7197) @@ -507,8 +507,19 @@ * @param user Wikiname for a registered user or e-mail address for a unregistered user * @param space The space for which to cancel the invitation */ - public void cancelInvitation(String user, String space) throws InvitationManagerException { - getInvitationManager().cancelInvitation(user, space, context); + public boolean cancelInvitation(String user, String space) + { + context.remove("InvitationManagerException"); + if (hasProgrammingRights()) { + try { + getInvitationManager().cancelInvitation(user, space, context); + return true; + } catch (InvitationManagerException e) { + context.put("InvitationManagerException", e); + return false; + } + } + return false; } /** _______________________________________________ notifications mailing list notifications@xwiki.org http://lists.xwiki.org/mailman/listinfo/notifications