EditSecurity Property
Returns or sets an FpListEditSecurity constant that determines which users can edit the current list.
FpListEditSecurity can be one of these FpListEditSecurity constants. |
fpListEditSecurityAll All users can edit the list. |
fpListEditSecurityNone No users can edit the list. |
fpListEditSecurityOnlyOwn Users can only edit their own lists. |
expression.EditSecurity
expression Required. An expression that returns one of the objects in the Applies To list.
Example
The following example changes the edit permissions of all lists of type fpListTypeBasicList to fpListEditSecurityOnlyOwn. Once the property is set, users can edit only lists that they have created.
Note Use the ApplyChanges method to save any changes made to the list.
Sub ChangeEditPermissions()
'Changes the permissions of all BasicLists in the web
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.EditSecurity <> fpListEditSecurityOnlyOwn Then
objList.EditSecurity = fpListEditSecurityOnlyOwn
objList.ApplyChanges
End If
End If
Next
End Sub