: IAccessControlList (Interfaz) (Microsoft.Office.Server.ApplicationRegistry.Infrastructure)
Provides a list of access control entries, specifying access rights for one or more trustees in the Business Data Catalog.
Espacio de nombres:
Ensamblado: Microsoft.SharePoint.Portal (in microsoft.sharepoint.portal.dll)
Sintaxis
'Declaración
Public Interface IAccessControlList
Inherits IEnumerable(Of IAccessControlEntry)
'Uso
Dim instance As IAccessControlList
public interface IAccessControlList : IEnumerable<IAccessControlEntry>
Ejemplo
The following code example shows you how to retrieve the access control list (ACL) for an LobSystem that is registered in the Business Data Catalog.
Prerequisites
Ensure a Shared Service Provider is already created.
Create an LobSystem instance and set connection parameters as shown in Procedimiento para crear LobSystem mediante el modelo de objetos de administración.
Create the ProductModel entity as shown in Procedimiento para crear una entidad mediante el modelo de administración de objetos
Create a Finder method as shown in Procedimiento para crear un método y filtros mediante el modelo de objetos de administración
Replace the constant value EnterYourSSPNameHere in the code with the name of your Shared Resource Provider.
Project References
Add the following Project References in your console application code project before running this sample:
Microsoft.SharePoint
Microsoft.SharePoint.Portal
Microsoft.Office.Server
using System;
using System.Collections.Generic;
using System.Text;
using Microsoft.Office.Server.ApplicationRegistry.Administration;
using Microsoft.Office.Server.ApplicationRegistry.Infrastructure;
using WSSAdmin = Microsoft.SharePoint.Administration;
using OSSAdmin = Microsoft.Office.Server.Administration;
namespace Microsoft.SDK.SharePointServer.Samples
{
class GetStartedAndCreateSystem
{
const string yourSSPName ="EnterYourSSPNameHere";
static void Main(string[] args)
{
SetupBDC();
GetAccessControlList();
Console.WriteLine("Press any key to exit...");
Console.Read();
}
static void SetupBDC()
{
SqlSessionProvider.Instance().SetSharedResourceProviderToUse(yourSSPName);
}
public static void GetAccessControlList()
{
LobSystemInstance mySysInstance = null;
LobSystemInstanceCollection sysInsCollection = ApplicationRegistry.Instance.GetLobSystemInstancesLikeName("AdventureWorksSampleFromCode");
foreach (LobSystemInstance sysInstance in sysInsCollection)
{
if (sysInstance.Name == "AdventureWorksSampleFromCode")
{
mySysInstance = sysInstance;
break;
}
}
LobSystem ls = mySysInstance.LobSystem;
IAccessControlList acl = ls.GetAccessControlList();
foreach (IAccessControlEntry ace in acl)
{
Console.WriteLine(ace.IdentityName);
Console.WriteLine(ace.Rights);
}
}
}
}
Vea también
Referencia
IAccessControlList (Miembros)
Microsoft.Office.Server.ApplicationRegistry.Infrastructure (Espacio de nombres)