Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Granting Data Access rights to Data Connections in .NET

Status
Not open for further replies.

phellis

Programmer
May 17, 2000
28
GB
Has anyone tried to grant "Data Access" rights on a Data Connection to an ObjectPrincipal using the .NET SDK?

ObjectPrincial.Rights has 3 methods: Add, AddCustom, AddSystem of which none seem to be documented as to assign the Data Access rights.

Can anyone help please?

Thanks
 
I managed to add the Data Access right using the AddCustomRight method

ObjectPrincipal.Rights.AddCustomRight(21495815, "MetaData.DataConnection")

I do not know if 21495815 is system specific but identified it having looked at known ObjectPrincipals who had the right set. All this seems to be undocumented within the SDK.
 
What version of BO and the SDK are you using? If it's 3.1 or older, this is probably the only way to do this. If it's 4.x, your best bet is to create a custom access level that includes this right. Then do the following:

1. Use InfoObject.SecurityInfo2.ExplicitPrincipals to get the ExplicitPrincipal (old "ObjectPrincipal")
2. Add the ID for the custom access level to the ExplicitPrincipal.Roles property.

In general, it is best practice in BO security to use access levels instead of explicit rights. And the available rights may change from version to version of BO.

-Dell



DecisionFirst Technologies - Seven-time SAP BusinessObjects Solution Partner of the Year
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top