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

How I can deny access to certain objects in page for some users?

Hi,

Please, I need you help me with that: How I can deny access to certain objects in page for some users?

In my page I have several objects (charts, tables, buttons) that I need disable for some users.

Thanks in advance

1 Solution

Accepted Solutions
Anonymous
Not applicable
Author

I see

In this case the expression would be:

=not wildmatch(OSUser(),'*loginname1','*loginname2')

or

wildmatch(OSUser(),'*loginname1','*loginname2')=0

View solution in original post

11 Replies
sbaldwin
Partner - Creator III
Partner - Creator III

Hi, use conditional visibility with a condition either making use of section access (with data reduction) or a condition using the osuser() function

Thanks

Steve

Not applicable
Author

Nancy,

There is no mechanism in QV to do that. You will have to "code" it.

1) Section Access

2) For each object, there is a conditional show sth like

OSUser='xxxx'

sum(XXX)> 1  (see doc)


See the document attached. It is a little old, but it works fine. See especially page 17. It is for the sheet, but you can transpose it to individual objects.

Fabrice

chiru_thota
Specialist
Specialist

you can use osuser() as steve mentioned.

Below screenshot is showing how to do it for sheet .but same can be done for different objects

Layout --> Conditional

Tab security.jpg

maxgro
MVP
MVP

see attachment

Anonymous
Not applicable
Author

Chiru,

This is certainly correct, I just prefer wildmatch() function.  It is not case sensitive, and no need to type domain part (because can use *), get much shorter expression:
=wildmatch(OSUser(),'*loginname1','*loginname2')

And it is not necessary use ">0" because if current user matches, the function returns result >0 which is "true".  If there is no match, it returns 0 which is "false" and the object is hidden.

Regards,

Michael

Not applicable
Author

thanks guys!

I am reviewing all your answers and I tell you later how I did it.

Not applicable
Author

Hi Chiranjeevi and Michael,

Thanks for your suggestions, but these match and wildmatch functions are for enable acces to users loginname1 and loginname2. I need disable access for users.

Any hint for this?

Thanks!

Anonymous
Not applicable
Author

Nancy,

In the example, access is disabled for all users except loginname1 and loginname2.  I assume there will be at least one user with access - so this one user will be in this expression.

Regards,

Michael

Edit:  If you want to disable access for all users without exceptions, but still want to keep this object for some reason, set show condition to 0;

Not applicable
Author

Michael,

It is the opposite. I need disable the access for 2 users and enable access for many other users. Too many users as to include in a list