Home | Forums | Contact | Search | Syndication  
 
 [login] [create account]   Thursday, October 31, 2024 
 
slxdeveloper.com Community Forums  
   
The Forums on slxdeveloper.com are now retired. The forum archive will remain available for the time being. Thank you for your participation on slxdeveloper.com!
 External Development Forums - SalesLogix OLEDB Provider
Forum to discuss using the SalesLogix OLE DB Provider from external applications (including usage of built-in provider procedures). View the code of conduct for posting guidelines.
Forums RSS Feed


 Back to Forum List | Back to SalesLogix OLEDB Provider | New ThreadView:  Search:  
 Author  Thread: Impersonate
tonio
Posts: 4
 
ImpersonateYour last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 27 Feb 07 10:47 AM
fiogf49gjkf0d
Hello
I am currently trying to use .Net with slx 6.2. My major concern is the security. therefore, i try to use "Impersonate" in the connection string:
In my web config, I get:
ersist Security Info=Trueassword=blabla;User ID=blabla;Initial Catalog=BLABLA;Location=BLABLA;providerName=System.Data.OleDb" />

then my code is:

Dim slxuserid As String

slxuserid = "U6BLABLA0078"
Dim cn As String = Nothing
Dim settings As ConnectionStringSettings = ConfigurationManager.ConnectionStrings("SlxProvider")
If Not settings Is Nothing Then
cn = settings.ConnectionString
End If
cn = cn & ";Impersonate = " & slxuserid

Dim dt As DataTable = New DataTable
Dim conn As OleDb.OleDbConnection = New OleDb.OleDbConnection(cn)
Dim adapter As OleDb.OleDbDataAdapter = New OleDb.OleDbDataAdapter
adapter.SelectCommand = New OleDb.OleDbCommand(sql, conn)
adapter.Fill(dt)

When I run a simple query such as select * from opporunity, it does not apply the SLX security... Would anyone know why?

Also, i was wondering: the SLX OLEDB does not allow to do complexe queries, would you know if it is possible to use the SLX security when creating a view in SQL Server?

THANKS A LOT FOR YOUR HELP

Tonio

[Reply][Quote]
tonio
Posts: 4
 
Re: ImpersonateYour last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 27 Feb 07 1:28 PM
fiogf49gjkf0d
okay... I got the answer for the first issue --> use the username and not the userid....
however, I tried using a sql server view and it does not work. I guess it is because the view is not declared in saleslogix like the tables...
Therefore, would anyone know a way to do complexe queries despite the fact that SLX OLEDB Provider does not handle every SQL functionalities.

Thanks
[Reply][Quote]
Nick Hollis
Posts: 549
Top 10 forum poster: 549 posts
 
Re: ImpersonateYour last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 28 Feb 07 1:42 AM
fiogf49gjkf0d
Hi Tonio,

Was the view owned by sysdba? If not i dont think it would work (the connection uses sysdba to access the database) - but otherwise you can use views...

Thanks

Nick
[Reply][Quote]
tonio
Posts: 4
 
Re: ImpersonateYour last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 28 Feb 07 8:39 AM
fiogf49gjkf0d
Hello Nick

Thanks for your answer. The view is actually owned by the sysdba.
The fact is that when the view is "select * from opporunity", a query on this view is going to display all the opportunities without considering the seccodeid of the team who owns the opportunity. Therefore the view would work fine if i did not have a security concern.
If you have any other thoughts...

Thanks

Tonio
[Reply][Quote]
Nick Hollis
Posts: 549
Top 10 forum poster: 549 posts
 
Re: ImpersonateYour last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 28 Feb 07 9:31 AM
fiogf49gjkf0d
Here is an example of the sql for the account view:

SELECT A1.*, S0.ACCESSID AS ACCESSID_
FROM sysdba.ACCOUNT A1 INNER JOIN
sysdba.SECRIGHTS S0 ON A1.SECCODEID = S0.SECCODEID

you can then say where userid = accessid; this is essentially adding your own security, obviously use opportunity table for if you want the security in this area....

Thanks,
Nick
[Reply][Quote]
Carlos H. Treviño
Posts: 10
 
Re: ImpersonateYour last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 28 Feb 07 11:21 AM
fiogf49gjkf0d
Could you give an example of what kind of queries you're unable to run through SLX OLEDB? It does have limitations but usually you can work around them.
[Reply][Quote]
Raul A. Chavez
Posts: 1300
Top 10 forum poster: 1300 posts
 
Re: ImpersonateYour last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 16 Apr 07 12:42 PM
fiogf49gjkf0d
To access the view thru the provider, you would need to be running SLX v7.
Log into either Architect or Workgroup Administrator, open the DB manager and Enable the view. This creates the necessary records inside the SecTableDefs and ResyncTableDefs.

Once you have done this you will be able to query that view thru the SLX Provider.
[Reply][Quote]
Timmus Agersea
Posts: 328
 
Re: ImpersonateYour last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 16 Apr 07 2:09 PM
Raul,

I suspect you have been misinformed/mislead by the new feature in 7.x. You can query SQL Views through the provider without placing them in the metadata tables. The reason to add views to the metadata tables is to ensure they are accessible via the query builder within the client (and potentially to sync the definition to remotes - the jury is still out on this one and apparently we are all to lazy to test it ). When writing code to query the database, there is no need to add views to the SalesLogix metadata tables.

Timmus
[Reply][Quote]
Raul A. Chavez
Posts: 1300
Top 10 forum poster: 1300 posts
 
Re: ImpersonateYour last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 16 Apr 07 2:28 PM
Thanks for the clarification.

I did try it and you were correct, no need to Enable the view to be able to query it via Code.

I do have done some work with Views and Bundle them to transfer across systems (and the view gets pushed to the DB as a Table, even though the Metadata on the target system still flag it as a View) [Then again, I bundled it with the "Create Table" option since I couldn't find a "Create View" alternative while bundling. [Luckily these views were being used for Admin purposes, so a quick SQL script and we had the system configured properly]
[Reply][Quote]
Bob (RJ)Ledger
Posts: 1103
Top 10 forum poster: 1103 posts
 
Re: ImpersonateYour last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 16 Apr 07 6:39 PM
There is NO support for creating views in SalesLogix or bundle actions..
--
rjl
[Reply][Quote]
 Page 1 of 1 
  You can subscribe to receive a daily forum digest in your user profile. View the site code of conduct for posting guidelines.

   Forum RSS Feed - Subscribe to the forum RSS feed to keep on top of the latest forum activity!
 

 
 slxdeveloper.com is brought to you courtesy of Ryan Farley & Customer FX Corporation.
 This site, and all contents herein, are Copyright © 2024 Customer FX Corporation. The information and opinions expressed here are not endorsed by Sage Software.

code of conduct | Subscribe to the slxdeveloper.com Latest Article RSS feed
   
 
page cache (param): 10/31/2024 5:45:33 PM