IAccessControlEntry Interface

Specifies access rights for a trustee (user, group, site, or service account) to perform Business Data Catalog application-specific implementations of common tasks.

Namespace:  Microsoft.Office.Server.ApplicationRegistry.Infrastructure
Assembly:  Microsoft.SharePoint.Portal (in Microsoft.SharePoint.Portal.dll)

Syntax

'Declaration
<SharePointPermissionAttribute(SecurityAction.InheritanceDemand, ObjectModel := True)> _
<SharePointPermissionAttribute(SecurityAction.LinkDemand, ObjectModel := True)> _
Public Interface IAccessControlEntry
'Usage
Dim instance As IAccessControlEntry
[SharePointPermissionAttribute(SecurityAction.InheritanceDemand, ObjectModel = true)]
[SharePointPermissionAttribute(SecurityAction.LinkDemand, ObjectModel = true)]
public interface IAccessControlEntry

Examples

The following code example shows you how to retrieve the access control list (ACL) for an LobSystem instance that is registered in the Business Data Catalog.

Prerequisites

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);
            }
        }
    }
}

See Also

Reference

IAccessControlEntry Members

Microsoft.Office.Server.ApplicationRegistry.Infrastructure Namespace