Free Support Forum - groupdocs.com

Error: the anonymous user is not permitted to invite collaborators


#1

Hi support,


Since somewhere last week we get this error when starting the collaboration tool:

"The anonymous user is not permitted to invite collaborators."

Please help us restore our integration.

Best regards,
Jeroen

#2
Hello, Jeroen

We are really sorry to hear that you have such issue. In the new version of the GroupDocs for Cloud the functionality for the anonymous user was disabled for security reasons.

Could you please share with us your use case that we will be able to suggest you a workaround for the issue.

Best regards
Evgen Efimov

http://groupdocs.com
Your Document Collaboration APIs
Follow us on LinkedIn, Twitter, Facebook and Google+


#3

Hi Evgen,


This is very unfortunate, especially because we were not notified of this breaking change, and could not anticipate it. You put us in a difficult position with our client(s) and not for the first time.

This is our use case:
- A user in our system start collaboration for a document.
- Our system uploads to your cloud.
- And adds the user and another person as collaborators.
- The user then sends a link to the collaboration page to the other person.
- Then starts collaboration him/herself in presentation mode.

Regards,

Jeroen

#4
Hello Jeroen,

Thank you for coming back with the details and sorry for the inconveniences. We investigated your use case and we can assume that you need to create a user that will be able to add collaborators. Earlier we had a bug when Anonymous user could add collaborators, but in the latest release this bug was fixed, so now only users that have rights to add collaborators can do this. It's possible that you should just update user's details for the user that you configured to work with collaborators. If you used "Anonymous" user, then now you should update it with correct user details.

If you have any issues with such updates, we will be glad to help you, just provide to us a code of that page where you work with collaborators, we can investigate and suggest you how to better update the code.

Best regards
Evgen Efimov

http://groupdocs.com
Your Document Collaboration APIs
Follow us on LinkedIn, Twitter, Facebook and Google+


#5

Hi Evgen,


These are snippets from our code:

// create service
GroupdocsService
service = new GroupdocsService(basePath, userId, privateKey);

....

// create user
UserInfo user = new UserInfo();
RoleInfo role = new RoleInfo();
RoleInfo[] roleList = new RoleInfo[1];

// Fill the role information
role.Id = 3;
role.Name = "User";
roleList[0] = role;

// Limit the length of the names (feature of GroupDocs)
if (firstName.Length > 20)
firstName = firstName.Substring(0, 20);
if (lastName.Length > 20)
lastName = lastName.Substring(0, 20);

// Fill the user information
user.NickName = firstName;
user.FirstName = firstName;
user.LastName = lastName;
user.PrimaryEmail = emailAddress;
user.Roles = roleList;

.....

// add the user
UserIdentity newCoach = service.UpdateAccountUser(coachInfo);


Please advice me how to change this.

Regards,

Jeroen


#6
Hello,

Thank you for additional information and code example. We have checked your code and looks like it's ok.. The issue reason is in code which adds new user as collaborator to the document. Could you please share with us the code which adds a collaborator and set GET parameter "uid" to the URL which will open a document that we can check and fix it for you.

Also you can check this functional in the live sample here . The collaborator will get email with the link for the document and he will be able to annotate/manage collaborators by opening the link.

Thank you in advance.

#7

Thank you for your response, Pavel,


My apologies for omitting that part. Here is our code for adding them as collaborator:

// Add collaborators
String[] emails = new String[2];
emails[0] = collaboratorEmail1;
emails[1] = collaboratorEmail2;
Groupdocs.Api.Contract.Annotation.SetCollaboratorsResult result = service.SetAnnotationCollaborators(externalFileStore.FileId, emails, "2.0");

if (result.Collaborators != null)
{
Groupdocs.Api.Contract.Annotation.SetReviewerRightsResult setReviewer = service.SetReviewerRights(externalFileStore.FileId, result.Collaborators);
}


And here is the code to create the collaboration url:

// set up the base path

StringBuilder iFrameUrl = new StringBuilder();
iFrameUrl.Append(AppSettings["GroupdocsAnnotationUrl"]);

ExternalFileStore storedFile = GetExternalFileStore();

// add the proper file
iFrameUrl.Append(storedFile.FileId);

if (presenterRole)
{
// the coach is viewing this page
iFrameUrl.Append("?uid=");
iFrameUrl.Append(storedFile.PresenterId);
iFrameUrl.Append("&master=true");
}
else
{
iFrameUrl.Append("?uid=");
iFrameUrl.Append(storedFile.ViewerId);
}

String privateKey = AppSettings["GroupdocsPrivateKey"];
Frame.Src = Groupdocs.Security.UrlSignature.Sign(iFrameUrl.ToString(), privateKey);


#8

Hi,


Thank you for quick response. We checked the code and found out that after adding a collaborator you have set reviewers rights for the new user - you shouldn’t do that. As you can see from our code example http://prntscr.com/4w134z we just adds a collaborator and then we have set a new user guid as a “uid” value in the URL.

Please replace this code line:
Groupdocs.Api.Contract.Annotation.SetReviewerRightsResult setReviewer = service.SetReviewerRights(externalFileStore.FileId, result.Collaborators);
with the error handling.
For example:
if (result.Collaborators == null)
{
String errorMessage = “Failed to add new collaborator”;
}


#9

Hi,


Sorry to report that this did not change anything. Error is still there. I will email a link as an example in a private message.

regards,
Jeroen

#10

Hi,


Thank you for sharing the URL. We checked it and found out that you use GET parameter “master=true” this parameter should be set only for admin user, since that simply remove it or set to false for the new users. After URL update try again and notify us with the result please.

#11

But this presenter role is the main reason we use GroupDocs! Please provide another solution.


Jeroen

#12

Hi,


Thank you for notification. We will investigate how to make a workaround for it and come back ASAP.

Thank you for the understanding and sorry again for the inconvenience.

#13

Hi,


Thank you for your patience. We have made some minor updates on our end and now all works fine with the “master=true” parameter.

Please try again and notify us with the results.

#14

Hi all,


It seems to work but the presentation and annotation performance is very bad at the moment. Much worse than before.

I will relay an example via Derek.

Regards,
Jeroen

#15

Hello Jeroen,


We are sorry to hear that you have the issue with the performance. Our core developers works on investigating and resolving the issue and we will return to you with the results ASAP.

#16

Hi,


Last week you tweaked something and our solution worked again, but thursday evening it was broken again. Please concentrate on repairing my system before improving the sluggishness, ok?

Best regards,
Jeroen

#17

Yes, Pavel.


It works again.

Best regards,
Jeroen

#18

Hello,


We are sorry to hear that the issue is raised again. We checked it with the URL that you provided earlier and we found out that the file which you use in it is deleted. Could you please check that the file you use is exist in your GroupDocs account, if you use different file - please share the link with us that we can check and fix it for you.

#19

Hi again,


Thank you for sharing the URL. We have checked and fixed all issues, please check and notify us if all works well for you.