Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Does admin(user) rights is required in document with section access

Hi All,

I don't have the admin user in my section access part. As per the document it says that admin user have the authority to restrict edit script,reload,save,etc options for the non admin user. But i admin user is not there in my document. Is there is any way to reduce restrict the user from accessing edit script,reload,save,etc options. Is it must that all the document with section access must have the admin user to restrict the non admin user? As currently we don't want the admin rights in our document.

Also let me know is it necessary that user name should only be 'admin' for the admin user. Can't it be with different name. Something like vadmin or administrator???

Hope some one will let me know the best possible way.

116 Replies
Not applicable
Author


Sajeevan wrote:
Please send the latest QVD files and the latest QVW file where your results are fine but the user access needs to be fixed. <div></div>


I have attached the latest file as per your request. But let me tell one thing. In this QVD there is no admin data available.

To get the admin login information I need to use the following query but I didn't used as it is forming synthetic key.


select c_mfac_code as mfaccode,c_account_code as account,c_name as mfacname,rtrim(c_account_code)+rtrim(c_loginid) as userid,
rtrim(c_password) as password from mfac_mst where c_loginid in('vadmin','admin')


I hope I have given all the details. Please do let me know if anything is missing.

To open use userid:0010012021, password:c2info99

Thanks and Regards,

Rikab

Not applicable
Author

Hi Rikab,

You need to solve the synthetic tables by yourself. There are two synthetic tables to be solved as below. You can have only one key between databases for correct linking of records. There is no point I correct it because you only know why you want the variables repeated between databases.

If you need more than one variable to be linked between the databases then you need to create a variable like the Hierarchy in each table and rename the variables which are causing synthetic link.

The access controls can be done only after this.

Thanks,

Sajeevan

Not applicable
Author


Sajeevan wrote:
You need to solve the synthetic tables by yourself. There are two synthetic tables to be solved as below. You can have only one key between databases for correct linking of records. There is no point I correct it because you only know why you want the variables repeated between databases.

If you need more than one variable to be linked between the databases then you need to create a variable like the Hierarchy in each table and rename the variables which are causing synthetic link.
The access controls can be done only after this. <div></div>


I have renamed the account as acc to avoid synthetic key. Also I have removed the hierarchy table which is causing another synthetic key and also first thing i want to solve is the login issue once this is solved later will think how to add the hierarchy table. Hope I have did everything that has been requested by you. If anything else you want please let me know.

I will tell why i previously connected the sales and item table with two fields(account and itemcode) that is just because i loaded the data two clients in the same document. So account will identify which client it is and the itemcode will identify item of which client as there are chances that itemcode may be same also.

So what ever i have given let it be like that only. Once the login issue is solved then we will think how to concatenate one more client in the same document and also we will do the required changes in the hierarchy once the login issue is solved.

Now I think you may need the table from where I am getting the admin login information.

Let me know the required things.

There is some problem with the website. I am not able to upload the files. Will send the document to your mail id soon.

userid: 0010012021, pwd: c2info99

________________

Note: This part I have added later on after posting this post.

Kindly omit the document which I have sent through mail as it is very larger which may time to download. Instead look in to the one which i managed to attach in this post.

In the attached file i have resolved the hierarchy problem by removing the synthetic key. Though it is not working we can resolve the login problem first then we can look in to other problems.

Thanks and Regards,

Rikab

Not applicable
Author

Hello Sajeevan!

As per your request hope I have done all the required things in my document. As you are busy with your current work. Requesting you to look in to my document in your free time. I am confident that this time we will be able to solve login issue as I have removed all issues you were talking about.

By the way to give rights to user/admin I have used the following script but it doesn't seems to be working. Don't know where the issues are?

http://community.qlik.com/forums/t/27715.aspx


TempTab:
LOAD DISTINCT
mfaccode,
[userid],
[password]
resident items;

Section Access;
// For the manufacturers(users)

SecurityTable:
LOAD DISTINCT
'USER' as [ACCESS],
upper([userid]) as [USERID],
upper([password]) as [PASSWORD],
upper(mfaccode) as SecurityMfa,
'Some' as SecurityPage
resident TempTab where [userid] <> ('001001admin') and userid <> ('001001vadmin');
// For the admin

CONCATENATE (SecurityTable)
LOAD DISTINCT
'USER' as [ACCESS],
upper([userid]) as [USERID],
upper([password]) as [PASSWORD],
upper(mfaccode) as SecurityAccount,
'*' as SecurityMfa,
'Some' as SecurityPage
resident TempTab where [userid] = ('001001admin') or userid = ('001001vadmin');

concatenate(SecurityTable)
LOAD * INLINE [
ACCESS, USERID, PASSWORD, SecurityMfa, SecurityPage
ADMIN, ADMIN, ADMIN, *, *,ALL
];


Please check and try to help me out when you are free

Thanks and Regards,

Rikab

Not applicable
Author

Hi Rikab,

Please find attached a modified version of your QVW file. You open this document with "Admin" as the username and "Admin" as the password then reload the data and then save. Look at the script to see the changes I have done in comparison to your old script.

Once the above is done, try to open the document with another user credential to see whether you are able to open it. Use the username as "0010012041" and password as "c2info99". You should be able to open it. Don't save it - it will save only the records relevant to this user credentials and other users except "admin" will not have access.

Always open the document with "Admin" for any modification in the document. You can add other user restricting variables like "SECURITYPAGE" etc.

Hope this resolves your issue.

Best Regards,

Sajeevan

Not applicable
Author


Sajeevan wrote:
Please find attached a modified version of your QVW file. You open this document with "Admin" as the username and "Admin" as the password then reload the data and then save. Look at the script to see the changes I have done in comparison to your old script.
Once the above is done, try to open the document with another user credential to see whether you are able to open it. Use the username as "0010012041" and password as "c2info99". You should be able to open it. Don't save it - it will save only the records relevant to this user credentials and other users except "admin" will not have access.
Always open the document with "Admin" for any modification in the document. You can add other user restricting variables like "SECURITYPAGE" etc.
Hope this resolves your issue.
<div></div>


After reloading the document sent by it was not working as you have attached the old document instead of the latest one. You have missed the following script in your document

CONNECT TO [Provider=SQLOLEDB.1;Persist Security Info=False;User ID=sa;Password=mercury;Initial Catalog=VPDPL-1;Data
Source=GL28;Use Procedure for Prepare=1;Auto Translate=True;Packet Size=4096;Workstation ID=GL28;Use Encryption for
Data=False;Tag with column collation when possible=False];
items:
concatenate select c_account_code as account,upper(c_account_code)as SecurityAccount,
upper(c_mfac_code) as SecurityMfa,c_mfac_code as mfaccode,rtrim(c_account_code)+rtrim(c_loginid) as userid,
rtrim(c_password) as password,c_name as mfacname from mfac_mst where c_loginid in('vadmin','admin');


After adding the above script that you have missed out in yours it was working.

But I am not able to understand the logic that you have used. Will be thankful to you if you can explain me briefly. Please do that when you are free


Section Access;

LOAD * INLINE [
ACCESS, USERID, PASSWORD, SECURITYMFA
ADMIN, ADMIN, ADMIN, ALL
];

LOAD DISTINCT
'USER' as [ACCESS]
,upper([userid]) as [USERID]
,upper([password]) as [PASSWORD]
,if(userid='001001admin' or userid='001001vadmin','ALL',upper(mfaccode)) as SECURITYMFA
resident items;

section Application;
star is *;

load * INLINE [
SECURITYMFA, mfaccode
ALL,*
];

load distinct
if(userid='001001admin' or userid='001001vadmin','ALL',upper(mfaccode)) as SECURITYMFA,
if(userid='001001admin' or userid='001001vadmin','*',upper(mfaccode)) as mfaccode
resident items;


Thanks and Regards,

Rikab

Not applicable
Author

Hi Sajeevan,

I am not able to give sheet wise access in my document which we did previously as i am not able to understand the logic behind your script. Will be thankful to you if you can added the sheet security in my document. Have attached the script that we used to give the sheetwise access of my document which we did few times back.


load * inline [
SecurityPage, SH_01,SH_02
ALL, 1, 1
Some, 1, 0
];


Thanks and Regards,

Rikab

Not applicable
Author

Hi Rikab,

Please check whether you have the "SecurityPage" in the load statement in "Section Access;". Please send me your current file if you cannot solve it yourself.

Thanks,

Sajeevan

Not applicable
Author


Sajeevan wrote:
Please check whether you have the "SecurityPage" in the load statement in "Section Access;". Please send me your current file if you cannot solve it yourself. <div></div>


It is working but just check whether I have done the right thing or not.(Working document attached)

By the way I told you to explain how your script works. I want to learn how it works as i don't want to dependent on you or any one else for the same problem in coming future also.

Some please explain the one which is in black especially the one which is in bold letter.


Section Access;

LOAD * INLINE [
ACCESS, USERID, PASSWORD, SECURITYMFA, SECURITYPAGE
ADMIN, ADMIN, ADMIN, ALL, ALL
];

LOAD DISTINCT
'USER' as [ACCESS]
,upper([userid]) as [USERID]
,upper([password]) as [PASSWORD]
,if(userid='001001admin' or userid='001001vadmin','ALL',upper(mfaccode)) as SECURITYMFA
,if(userid='001001admin' or userid='001001vadmin','ALL','Some') as SECURITYPAGE

resident items;

section Application;
star is *;

//Mfac security

load * INLINE [
SECURITYMFA, mfaccode
ALL,*
];


//Security page

load * inline [
SECURITYPAGE, SH_01,SH_02
ALL, 1, 1
Some, 1, 0
];


load distinct
if(userid='001001admin' or userid='001001vadmin','ALL',upper(mfaccode)) as SECURITYMFA,
if(userid='001001admin' or userid='001001vadmin','*',upper(mfaccode)) as mfaccode
resident items;



Thanks and Regards,

Rikab

Not applicable
Author

Hi Rikab,

Please find attached the modified one.

I have explained everything in the script.

I have disabled "initial data reduction based on section access" in this document. Please reload the data then re-enable, then save. Try logging in as a user as well as admin to see whether it is working or not.

If it is not working then send me the QVD files again.

Thanks,

Sajeevan