Share via


SPPermissionCollection members

NOTE: This API is now obsolete.

Use the new SPRoleDefinition and SPRoleAssignment classes instead, to define roles and to assign users to them. For more information, see Authorization object model. (In Windows SharePoint Services 2.0, SPRole represented a collection of SPPermission objects and is maintained for backward compatibility.)

The SPPermissionCollection type exposes the following members.

Properties

  Name Description
Public property Count Obsolete. Gets the number of permissions in the collection. (Overrides SPBaseCollection.Count.)
Public property Inherited Obsolete. Gets a Boolean value that specifies whether the collection is inherited from the parent object.
Public property Item[Int32] Obsolete. Gets the permission object at the specified index in the collection. In C#, this property is an indexer for the SPPermissionCollection class.
Public property Item[SPMember] Obsolete. Gets the permission object with the specified member from the collection. In C#, this property is an indexer for the SPPermissionCollection class.
Public property Parent Obsolete. Gets the parent object for the collection of permissions, which can be a list or a site.
Public property RequestAccess Obsolete. Gets or sets a Boolean value that specifies whether request for access is enabled for a list.
Public property RequestAccessEmail Obsolete. Gets or sets whether request for access is enabled for a site and specifies the e-mail address to which requests are sent.
Public property Xml Obsolete. Gets the collection of permissions in XML format.
Public property Xml2 Obsolete. Gets the collection of permissions in XML format.

Top

Methods

  Name Description
Public method Add Obsolete. Creates a permission object with the specified member and permissions in the collection.
Public method AddCollection Obsolete. Adds users and their permissions to a list, modifies the permissions of users for a list, modifies the permissions of an existing group for a list, or modifies the permissions of an existing role for a site.
Public method CheckPermissions Obsolete. Verifies whether the current user has the specified permissions for the list or site and, if not, throws an Access Denied exception.
Public method DoesUserHavePermissions Obsolete. Returns a value that indicates whether the current user has the specified permissions.
Public method Equals (Inherited from Object.)
Protected method Finalize (Inherited from Object.)
Public method GetEnumerator Gets an enumerator to iterate through the collection. (Inherited from SPBaseCollection.)
Public method GetHashCode (Inherited from Object.)
Public method GetType (Inherited from Object.)
Public method GetTypedEnumerator<T> Returns a type-safe enumerator to iterate through the collection. (Inherited from SPBaseCollection.)
Protected method MemberwiseClone (Inherited from Object.)
Public method Remove(Int32) Obsolete. Removes the permission object at the given index in the collection.
Public method Remove(SPMember) Obsolete. Removes from the collection the permission that is associated with the specified member.
Public method RemoveCollection Obsolete. Removes the permissions represented by an integer array of member IDs from the collection.
Public method ResetPermissions Obsolete. Resets the permissions inherited from the parent object.
Public method ToString (Inherited from Object.)

Top

Explicit interface implementations

  Name Description
Explicit interface implemetationPrivate method ICollection.CopyTo Copies the elements of the collection to an array, starting at the specified array index. (Inherited from SPBaseCollection.)
Explicit interface implemetationPrivate property ICollection.IsSynchronized Gets a Boolean value that indicates whether access to the collection is synchronized or thread-safe. (Inherited from SPBaseCollection.)
Explicit interface implemetationPrivate property ICollection.SyncRoot Gets an object that is used to synchronize access to the collection. (Inherited from SPBaseCollection.)

Top

See also

Reference

SPPermissionCollection class

Microsoft.SharePoint namespace