ReadSecurity Property
Returns or sets an FpListReadSecurity constant that represents which users can read the information in a specified list. Read/write.
FpListReadSecurity can be one of these FpListReadSecurity constants. |
fpListReadSecurityAll All users can read the list. |
fpListReadSecurityOnlyOwn Only the creator of the list can read it. |
expression.ReadSecurity
expression Required. An expression that returns one of the objects in the Applies To list.
Example
The following example changes the read permissions of all lists of type fpListBasicList in the active Web site to fpListReadSecurityAll. All users can now read all lists of type fpListTypeBasicList.
Note Use the ApplyChanges method to save any changes to the list.
Sub ChangePermissions()
'Changes permission of all BasicLists in the current Web site
Dim objApp As FrontPage.Application
Dim objList As Object
Dim objLists As Lists
Set objApp = FrontPage.Application
Set objLists = objApp.ActiveWeb.Lists
'Cycle through each list and check for list type
For Each objList In objLists
'If it's a BasicList then change permissions
If objList.Type = fpListTypeBasicList Then
If objList.ReadSecurity <> fpListReadSecurityAll Then
objList.ReadSecurity = fpListReadSecurityAll
objList.ApplyChanges
End If
End If
Next
End Sub