Group.DeleteSiteCollectionReadOnlyAccess method
Removes a site collection from having read-only access to this local site collection group.
Namespace: Microsoft.SharePoint.Taxonomy
Assembly: Microsoft.SharePoint.Taxonomy (in Microsoft.SharePoint.Taxonomy.dll)
Syntax
'Declaration
Public Function DeleteSiteCollectionReadOnlyAccess ( _
siteCollectionUrl As String _
) As Boolean
'Usage
Dim instance As Group
Dim siteCollectionUrl As String
Dim returnValue As Boolean
returnValue = instance.DeleteSiteCollectionReadOnlyAccess(siteCollectionUrl)
public bool DeleteSiteCollectionReadOnlyAccess(
string siteCollectionUrl
)
Parameters
siteCollectionUrl
Type: System.StringThe Url of the site collection.
Return value
Type: System.Boolean
true if the specified site collection URL is deleted; otherwise, false.
Exceptions
Exception | Condition |
---|---|
UnauthorizedAccessException | The current user has insufficient permissions to perform this operation. To use this method, the ManageTermStore permission or GroupManager permission is required. |
System.InvalidOperationException | The group is not a site collection group. |
Remarks
In order for a site collection to access its local group, it needs to be added to the group. This method removes the requested site collection from the list that can access this group.
If the group is not a site collection group, this method has no effect.
CommitAll() must be called in order to save this change to the database.