You are viewing limited content. For full access, please sign in.

Question

Question

How do you assign and remove named user licenses with SDK 9.2?

asked on March 11, 2015 • Show version history

I was using

 UserInfo UI = new UserInfo();
UI.Session = mySess;
UI.Name = userName;
UI.Password = password;
...
UI.NamedUserStatus = NamedUserStatus.ReadWrite;
UI.Save();

To just create new users and assign a license.  That's apparently not supported in SDK 9.2. NamedUserStatus is just for getting the status now.  

 

I really just want to manage (assign to users and remove from users) named user licenses the correct way.  How do you do that in SDK 9.2?  I do not see it in the documentation.  Thank you.

1 0

Answer

SELECTED ANSWER
replied on March 11, 2015

Due to security changes in Laserfiche Server 9.2, you now need a server-level session instead of a repository session to change license assignment. In RA92, take a look at the Laserfiche.RepositoryAccess.Admin namespace. Here's a quick snippet for one way to register a new user as a repository named user in an Laserfiche Avante repository. 

Laserfiche.RepositoryAccess.Admin.LaserficheNamedUserDatabase lfnudb = Laserfiche.RepositoryAccess.Admin.LaserficheNamedUserDatabase.GetFromServerManagement(new Laserfiche.RepositoryAccess.Admin.ServerManagement("SampleLFServerName"));
                
lfnudb.RegisterLaserficheNamedUser("SampleUserName", "SampleLFRepositoryName", NamedUserStatus.ReadWrite);

Make sure your code is running as someone who's a system manager for your Laserfiche Server. I've put in a request to update the SDK documentation to reflect this change.

2 0
replied on May 13, 2015

Do you got the example for vb.net?

0 0
replied on February 2, 2018

Hi Roger, and in RIO how is it assigned?

0 0

Replies

replied on March 11, 2015

Thanks Roger.

0 0
You are not allowed to follow up in this post.

Sign in to reply to this post.