11/22/2024 2:56:40 PM
|
|
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!
Forum to discuss designing applications to work with SalesLogix. View the code of conduct for posting guidelines.
|
|
|
|
How to implement security in Saleslogix?
Posted: 23 Jul 07 3:19 AM
|
Can anyone please explain how the seccode security works in saleslogix? i want to know all the accounts owned by a particular logged in user, what tables should i look into.. there are many tables linking seccodeid. For example the following query brings all the distinct seccodeid from accounts. how should i map userid to seccodeid?
SELECT DISTINCT S1.SECCODEID FROM SECCODE S1 INNER JOIN ACCOUNT A1 ON (S1.SECCODEID=A1.SECCODEID) ORDER BY SECCODEID GO
if i look into the table relationships, i am able to find that there is parent and child seccodeid and profile id. also there are teams, departments and group level security. If the seccodeid is set to everyone, those records also needs to be linked to currentuserid.
Can anyone explain how this field, account level security be implemented? |
|
|
|
Re: How to implement security in Saleslogix?
Posted: 23 Jul 07 8:14 AM
|
I was able to get all the opportunities for admin through this query below:
select distinct opportunityid from opportunity where seccodeid in (select distinct CHILDSECCODEID from seccodejoins where profileid in (Select profileid from secrights where accessid ='admin')) and seccodeid in (select distinct PARENTSECCODEID from seccodejoins where profileid in (Select distinct profileid from secrights where accessid ='admin')) order by opportunityid
when i checked it with saleslogix client, it showed the exact amount of opportunities (77 rows - in SLX eval db)
but when i tried it with another userid - 'UFFED0000034' it returned 77 rows number of rows. but when i checked in saleslogix client it had only 74 rows..
select distinct opportunityid from opportunity where seccodeid in (select distinct CHILDSECCODEID from seccodejoins where profileid in (Select profileid from secrights where accessid ='UFFED0000034')) and seccodeid in (select distinct PARENTSECCODEID from seccodejoins where profileid in (Select distinct profileid from secrights where accessid ='UFFED0000034')) order by opportunityid
could anybody please tell me what's wrong in this approach?
|
|
|
|
Re: How to implement security in Saleslogix?
Posted: 24 Jul 07 10:34 AM
|
I think this would work
SELECT * FROM opportunity WHERE seccodeid IN ( select defaultseccodeid from USERSECURITY where userid = 'U6UJ9A00003B' UNION ALL SELECT parentseccodeid FROM seccodejoins where childseccodeid = (select defaultseccodeid from USERSECURITY where userid = 'U6UJ9A00003B') )
I don't think this works with the admin user though because the admin user has access to everything, right?
Your method is pulling the profile for the user (read only, read write etc...) and then pulling all seccodes for that profile. The sec code is the access level for the record. So for a particular user, they can see the record if it belongs to them (record.seccodeid = usersecurity.defaultseccodeid) or if a group that they belong to can see the record (done in the seccodejoins table).
Disclaimer: I don't know this to be true, just what i've observed.
|
|
|
|
Re: How to implement security in Saleslogix?
Posted: 25 Jul 07 1:31 AM
|
What is it you are actually trying to do ? If you simply want to secure your data - add the column SECCODEID to your table and populate it with user/team and SLX will automatically then add an additional clause to ANY query the user makes to ensure they only get the data they are entitled to.
|
|
|
|
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!
|
|
|
|
|
|
|
|