-
Notifications
You must be signed in to change notification settings - Fork 24
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: pair application with invitation
- if the user got an invitation link with pre-approved invitation token check that the invitation exists and is in a pending state - on submit the group application send also the invitation token
- Loading branch information
Showing
8 changed files
with
169 additions
and
72 deletions.
There are no files selected for viewing
33 changes: 33 additions & 0 deletions
33
perun-wui-core/src/main/java/cz/metacentrum/perun/wui/json/managers/InvitationsManager.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
package cz.metacentrum.perun.wui.json.managers; | ||
|
||
import com.google.gwt.http.client.Request; | ||
import cz.metacentrum.perun.wui.json.JsonClient; | ||
import cz.metacentrum.perun.wui.json.JsonEvents; | ||
|
||
/** | ||
* Manager with standard callbacks to Perun's API (InvitationsManager). | ||
* <p/> | ||
* Each callback returns unique Request used to make call. Such call can be removed | ||
* while processing to prevent any further actions based on it's {@link cz.metacentrum.perun.wui.json.JsonEvents JsonEvents}. | ||
* | ||
* @author Rastislav Kruták <[email protected]> | ||
*/ | ||
public class InvitationsManager { | ||
|
||
private static final String INVITATIONS_MANAGER = "invitationsManager/"; | ||
|
||
/** | ||
* Check whether the invitation given by the UUID token exists and is in a pending state. | ||
* | ||
* @param invitationUUID UUID of an invitation to check | ||
* @param events Events done on callback | ||
* | ||
* @return Request unique request | ||
*/ | ||
public static Request canInvitationBeAccepted(String invitationUUID, JsonEvents events) { | ||
JsonClient client = new JsonClient(events); | ||
client.put("uuid", invitationUUID); | ||
return client.call(INVITATIONS_MANAGER + "canInvitationBeAccepted"); | ||
|
||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters