共用方式為


SPRoleAssignmentCollection.RemoveFromCurrentScopeOnly method

從目前的安全性範圍中移除指定的使用者或群組。

Namespace:  Microsoft.SharePoint
Assembly:  Microsoft.SharePoint (in Microsoft.SharePoint.dll)

Syntax

'宣告
Public Sub RemoveFromCurrentScopeOnly ( _
    member As SPPrincipal _
)
'用途
Dim instance As SPRoleAssignmentCollection
Dim member As SPPrincipal

instance.RemoveFromCurrentScopeOnly(member)
public void RemoveFromCurrentScopeOnly(
    SPPrincipal member
)

參數

Exceptions

Exception Condition
InvalidOperationException

ParentSecurableObject屬性的HasUniqueRoleAssignments屬性是false。

備註

這個方法中不會移除所有的 subscopes 的成員。它應該只用於當透過某些外部群組或 SharePoint 群組中的成員資格目前的安全性範圍內指定的成員已經擁有的使用權限。您可以呼叫這個方法,以清除多餘的角色指派指定的成員,當成員已經透過某些外部群組或 SharePoint 群組中的成員資格的權限。

請參閱

參照

SPRoleAssignmentCollection class

SPRoleAssignmentCollection members

Microsoft.SharePoint namespace