Restrict Visibility by Profile

Questions about and code samples for adding visibility conditions within Select
Post Reply
kendale.wyatt
Posts: 27
Joined: Wed Sep 26, 2018 1:24 pm

Restrict Visibility by Profile

Post by kendale.wyatt »

Is it possible to restrict document visibility by profile without having to create a new document tree?
BobRichards
Posts: 1383
Joined: Wed Jan 15, 2014 3:50 pm
Location: Raleigh, NC
Contact:

Re: Restrict Visibility by Profile

Post by BobRichards »

I'm not sure what you mean. Visibility conditions can be added to individual ReadyDocs as well as ReadyDoc Tree folders. You are free to create any logic condition in the Visibility Condition you want. If you need to incorporate the order's ownership profile's full path in the logic, it is available at "Order.OwnershipProfile.Path".

Code: Select all

# Only show when the Profile begins with Default\Titan Settlement Services\Southeast
path = Order.OwnershipProfile.Path
return path.lstrip().startswith('Default\\Titan Settlement Services\\Southeast’
Notice that you need to double the backslashes inside of Python single or double quotes since a backslash has a special meaning: Backslash (escape) sequences.
Bob Richards, Senior Software Developer, SoftPro
nphilips
Posts: 1
Joined: Thu May 23, 2024 6:07 am

Re: Restrict Visibility by Profile

Post by nphilips »

Is there a way to restrict visibility based on the current profile that the user is logged in to (as opposed to the ownership profile of the file)?
BobRichards
Posts: 1383
Joined: Wed Jan 15, 2014 3:50 pm
Location: Raleigh, NC
Contact:

Re: Restrict Visibility by Profile

Post by BobRichards »

No.

The environment for Visibility conditions loads the following namespaces automatically:
  • System.Core
  • SoftPro.ClientModel
  • SoftPro.Select.Client
  • SoftPro.OrderTracking.Client
Because you can't add "import/using" statements in the source code, you cannot add the namespace for the active profile interface "IProfileManagers" (SoftPro.Select.Client.Profiles). This limitation is to force the document visibility state to be very quickly determined due to the shear number of documents. If not constrained, someone would undoubtedly call an interface that goes to the database and the Documents screen would fill very slowly.
Bob Richards, Senior Software Developer, SoftPro
Post Reply