AddRole(Microsoft.SharePoint.Portal.PortalContext, String, String, Microsoft.SharePoint.Portal.Security.PortalRight) Method

The AddRole method of the SecurityManager class adds a role to a portal site with the specified title, description, and rights.

Parameters

ctx   A Microsoft.SharePoint.Portal.PortalContext value that represents the portal site.

title   The title for the role.

description   The description of the role.

rights   A Microsoft.SharePoint.Portal.Security.PortalRight value that represents the rights for the role.

Remarks

You need to have the ManageAreaSecurity right on the root area to call this method.

Return Value

The Microsoft.SharePoint.Portal.Security.Role object that represents the role added to the portal site.

Example

The following example shows how to add a role to a portal site.

Requirements

Platforms: Microsoft Windows Server 2003

Security: Code Access Security