mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-08-07 17:49:17 +00:00
Fix to Invite REST API where inviteeUserName arg was not correctly checked when inviting external users.
Also cleanup the related .js scripts to use spaces not tabs - significantly aids debugging in the script debugger. git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@13913 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
@@ -1,7 +1,6 @@
|
||||
/**
|
||||
* List/Search invitations implementation
|
||||
*/
|
||||
|
||||
function main()
|
||||
{
|
||||
// Get the site id
|
||||
|
@@ -1,5 +1,6 @@
|
||||
// Cancel invitation for a web site
|
||||
|
||||
/**
|
||||
* Cancel invitation for a web site
|
||||
*/
|
||||
function main()
|
||||
{
|
||||
// Get the url values
|
||||
@@ -16,7 +17,6 @@ function main()
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
// Need to cancel an invitation here
|
||||
var invitation = site.getInvitation(inviteId);
|
||||
if (invitation == null)
|
||||
|
@@ -3,7 +3,6 @@
|
||||
*/
|
||||
function main()
|
||||
{
|
||||
|
||||
// Get the site id
|
||||
var urlElements = url.extension.split("/");
|
||||
var shortName = urlElements[0];
|
||||
@@ -31,4 +30,3 @@ function main()
|
||||
}
|
||||
|
||||
main();
|
||||
|
||||
|
@@ -3,7 +3,6 @@
|
||||
*/
|
||||
function main()
|
||||
{
|
||||
|
||||
var invitation = null;
|
||||
|
||||
// Get the web site site
|
||||
@@ -78,8 +77,7 @@ function main()
|
||||
|
||||
if (invitationType == "NOMINATED")
|
||||
{
|
||||
|
||||
// Get Mandatory properties
|
||||
// Get mandatory properties
|
||||
if (!json.has("inviteeRoleName"))
|
||||
{
|
||||
status.setCode(status.STATUS_BAD_REQUEST, "The inviteeRoleName has not been set.");
|
||||
@@ -95,17 +93,14 @@ function main()
|
||||
var acceptUrl = json.get("acceptURL");
|
||||
var rejectUrl = json.get("rejectURL");
|
||||
|
||||
/**
|
||||
* Get the optional properties
|
||||
*/
|
||||
if(json.has("inviteeUserName"))
|
||||
// Get the optional properties
|
||||
if (json.has("inviteeUserName") && json.get("inviteeUserName") != "")
|
||||
{
|
||||
var inviteeUserName = json.get("inviteeUserName");
|
||||
invitation = site.inviteNominated(inviteeUserName, inviteeRoleName, serverPath, acceptUrl, rejectUrl);
|
||||
invitation = site.inviteNominated(json.get("inviteeUserName"), inviteeRoleName, serverPath, acceptUrl, rejectUrl);
|
||||
}
|
||||
else
|
||||
{
|
||||
// Get Mandatory properties
|
||||
// Get mandatory properties
|
||||
if (!json.has("inviteeFirstName"))
|
||||
{
|
||||
status.setCode(status.STATUS_BAD_REQUEST, "The inviteeFirstName has not been set.");
|
||||
|
@@ -1,7 +1,6 @@
|
||||
/**
|
||||
* List invitations implementation
|
||||
*/
|
||||
|
||||
function main ()
|
||||
{
|
||||
// Get the site id
|
||||
|
Reference in New Issue
Block a user