Restricting access to documents based on IP


(Awilliams) #1

Squiz Matrix v5.3.4.0

Hi there, we have an intranet that uses a show_if design area to restrict access by IP.
Now this all works fine for pages but not for documents. Is there a way to restrict access to documents too? We don’t really want users to have to login to view documents.

Thanks

Amanda


(David Schoen) #2

I’d normally remove public read from the files, put the public user in a group selectively based on IP on the restrictions screen and then grant that group read to any assets (this works the same for both files and Standard Pages).


(Awilliams) #3

Thank you David, that’s really useful information. I shall give it a go.


(Awilliams) #4

Hi again David,

I have removed public read from a test PDF file, put public user into a group ‘Intranet viewing’, set the user restrictions based on IP (screenshot attached) and then set permissions on the intranet viewing group to grant public user read permissions, but the document with read permissions set to ‘intranet viewing’ group is giving me the login screen. So something isn’t working but I can’t see what.

Any ideas what i could be doing wrong or have missed?

Thanks

Amanda


(David Schoen) #5

Hi Amanda,

If you put %globals_user_attribute_login_ip% in a page and view that as a logged in user, do you get one of the IPs you’ve allowed, 127.0.0.1 or something else?

If it’s 127.0.0.1 (or a server network range) it may be that Matrix isn’t configured to understand what proxies are in front of it.


(Awilliams) #6

Thanks David,

If I put the keyword ona page in the intranet it shows nothing, but if I put it in our main website which is in the same installation, it shows 127.0.0.1.

I’ll contact Squiz about it and tell them what you’ve told me.

Amanda


(Awilliams) #7

You were correct David, now that Matrix has been configured correctly it works perfectly. thanks for your help.