function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
JThomasJThomas 

Can user permissions to a library be controlled via Apex?

We have a customer portal where the users are managed by customer admins.  We want to give all new users read access to a certain content library, and I can't find anything in the documentation that states that we can update a user's permissions to a library via apex.  Is this possible?  My workaround is to generate a case to us everytime a new user is created, and we'll manually go in and set the new user's permissions via the UI.  I'd really rather have it automated.  Does anyone know how I can accomplish this?

 

Thanks.

Best Answer chosen by Admin (Salesforce Developers) 
Alex.AcostaAlex.Acosta

you may be able to add them to a share group when portal clients are created. this why they have access to content when generating users.

All Answers

Alex.AcostaAlex.Acosta

you may be able to add them to a share group when portal clients are created. this why they have access to content when generating users.

This was selected as the best answer
JThomasJThomas

That would work.  Thanks.