得到了答案here。我可以在BCS模式设置字段是WindowsSecurityDescriptorField,然后我可以使用自定义代码在我的BCS方法来创建一个访问控制列表:
Byte[] GetSecurityDescriptor(string domain, string username)
{
NTAccount acc = new NTAccount(domain, username);
var sid = (SecurityIdentifier)acc.Translate(typeof(SecurityIdentifier));
CommonSecurityDescriptor sd = new CommonSecurityDescriptor(false, false,
ControlFlags.None,sid,null, null, null);
sd.SetDiscretionaryAclProtection(true, false);
//Deny access to everyone
SecurityIdentifier everyone = new SecurityIdentifier(
WellKnownSidType.WorldSid, null);
sd.DiscretionaryAcl.RemoveAccess(AccessControlType.Allow, everyone,
unchecked((int)0xffffffffL), InheritanceFlags.None, PropagationFlags.None);
//Grant full access to specified user
sd.DiscretionaryAcl.AddAccess(AccessControlType.Allow, sid,
unchecked((int)0xffffffffL), InheritanceFlags.None, PropagationFlags.None);
byte[] secDes = new Byte[sd.BinaryLength];
sd.GetBinaryForm(secDes, 0);
return secDes;
}
这工作得很好,让我一次,我翻译的用户创建自定义的ACL在后端系统和Active Directory之间。
我仍然有兴趣听到如果某人如果将安全性作为BCS模型的一部分有其他方式。
忽然想知道bcs ... – 2010-04-12 17:59:37