赏梅斋

关注微软技术

博客园 首页 新随笔 联系 订阅 管理

K2 Blackpearl 4.5和以前的版本一样,除了支持AD用户外,也支持SQL用户。

配置其实很简单,只要执行一下如下的一段SQL就可以了。

 

INSERT INTO [K2HostServer].[dbo].[SecurityLabels]
           (
[SecurityLabelID]
           ,
[SecurityLabelName]
           ,
[AuthSecurityProviderID]
           ,
[AuthInit]
           ,
[RoleSecurityProviderID]
           ,
[RoleInit]
           ,
[DefaultLabel])
     
VALUES
           (
'8e8d5221-ee89-4cd7-99da-fcfcdf64abdb',
'K2SQL',
'fc1848e6-23f5-49d8-8c48-9f7b197c80b7',
'<AuthInit><init>k2-demo,K2SQLUM</init><login/><implementation assembly="SQLUM, Version=4.0.0.0, Culture=neutral, PublicKeyToken=16a2c5aaaa1b130d"
type="SQLUM.K2UserManager"/></AuthInit>
',
'fc1848e6-23f5-49d8-8c48-9f7b197c80b7',
'<roleprovider><init>k2-demo, K2SQLUM</init><login/><implementation assembly ="SQLUM, Version=4.0.0.0, Culture=neutral, PublicKeyToken=16a2c5aaaa1b130d" type ="SQLUM.K2UserManager"/></roleprovider>',
'0'
)

其中,k2-demo是服务器名称。

这段SQL实际上就是在K2 Host Server数据库中SecurityLabels表中添加了两条记录。

配好这个后,我们就可以在SQL Management Studio中添加用户了,我们只需要执行K2SQLUM数据库下的存储过程“CreateUser”即可。

添加好用户后,就可以在WorkSpace中在Server rights下把新添加的用户授权了。

 

posted on 2011-04-25 10:23  赏梅斋  阅读(960)  评论(1编辑  收藏  举报