Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Section Access - View all data

Hi,

I am trying to implement section access so that some users can see all data (user SEINTHAN) and others have restriced access (user SEINAXTI). I have tried the code below. I am using this on an QVS 9.

User SEINTHAN can logon and sees all data. SEINAXTI cannot logon. Can someone help me what I am doing wrong?







Section Access;

SecTab:
LOAD * INLINE [
NTNAME, KA1, ACCESS, NTDOMAINSID
SEINTHAN, XX, USER, S-1-5-21-3856358470-4250892236-3704298111
SEINAXTI,V1, USER, S-1-5-21-3856358470-4250892236-3704298111
];
Section Application;

TabA:
LOAD * INLINE [
A1, A2, A3
V1, V2, V3
X1, X2, X3
];


AccessA:
LOAD
A1 as KA1,
A1
RESIDENT TabA;


AccessA:
LOAD
'XX' as KA1,
A1
RESIDENT TabA;





4 Replies
Miguel_Angel_Baeyens

Helo,

It seems that user SEINAXTI doesn't have a valid value for KA1 field, which seems to be the reduction field. Reduction field must have any existing value in the data model so the user can log in and see info. See the following example

SECTION ACCESS; LOAD * INLINE [ ACCESS, USERID, PASSWORD, SALESREP USER, USER1, USER1, A USER, USER2, USER2, B ]; SECTION APPLICATION;// Now all your script...Clients:LOAD CODE,NAME,SALESREP,ADDRESSFROM FILE.QVD (QVD);... // Rest of the script


When is checked "Reduce data based on Section Access" and "Strict Exclusion" in your document properties, Settings menu, On Open tab, you have to make sure that there are records in table "Clients" for that SALESREP value is "B", otherwise USER2, although typing user and password right, will not have access to see info, actually, he cannot login to the document, as there are no possible values for his reduction field SALESREP.

I don't get why you are loading in your sample script "TabA" three times, but I hope this example i useful for what you are looking for.

Regards.

Not applicable
Author

Thanks for your answer, but it doesn't solve my problem. Let me give more info. The script is only a simplification of a much more complicated and therefore soome things seems unnessesary.

I have some users that only should have access to limitied information in this case SEINAXTI and some users that shall have access to all information SEINTHAN.

The security table in section access looks like this

ACCESS NTNAME NTDOMAINSID KA1
USER SEINAXTI xxxxxx V1
USER SEINTHAN xxxxxx XX

KA1 is the key to the access table in the section application:

KA1 A1
V1 V1
X1 X1
XX V1
XX X1

The data table contains

A1 A2 A3
V1 V2 V3
X1 X2 X3

According to this SEINAXTI have access to KA1=V1 which should give access to A2=V2 and A3=V3. That is also how it works if you test without section access. But when adding section access the SEINAXTI user doesn't get access to the application.

Miguel_Angel_Baeyens

Hi

What happens when, without section access you select V1 value for KA1 field? Are V2 and V3 selected?

You can set three lines for the same user, should you want this user to access to three different field values, which seems to me to be the case, one line for each V1, V2 and V3.

Hope that helps.

Anonymous
Not applicable
Author

For testing, try "initial selection" instead of "initial data reduction". It might show you what exactly is going on.
Another recommendation - try upper(A1) as KA1. It may help even if the actual values are in upper case already.