DesignSecurity Property
Returns or sets an FpListDesignSecurity constant that defines the security permissions of the List.
FpListDesignSecurity can be one of these FpListDesignSecurity constants. |
fpListDesignSecurityCreator Only the creator of the list has permission to modify it. |
fpListDesignSecurityEveryone All users have permission to modify the list. |
expression.DesignSecurity
expression Required. An expression that returns one of the objects in the Applies To list.
Example
The following example changes the security mode of each BasicList object in the current web. The subroutine changes the DesignSecurity property to fpListDesignSecurityEveryone
if it isn't already set. Once the property is set, all users can edit the design settings of BasicList objects in the current web.
Note Use the ApplyChanges method to save any changes made to the list.
Sub SetSecurityType()
'Changes security type of all BasicLists.
Dim objApp As FrontPage.Application
Dim objList As List
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 than change permissions
If objList.Type = fpListTypeBasicList Then
If objList.DesignSecurity <> _
fpListDesignSecurityEveryone Then
objList.DesignSecurity = _
fpListDesignSecurityEveryone
End If
objList.ApplyChanges
End If
Next
End Sub