PassMark Logo
Home » Forum

Announcement

Collapse
No announcement yet.

Limit result to dynamically specified folder (run-time)

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Limit result to dynamically specified folder (run-time)

    Hallo, here is a question from Norway.

    I have a system where access to some files are limited by user login. The problem is that, I can't figure out how to limit the result returned by the search to leave out files that the user does not have the privilege to view.

    The user has right to see all files in one directory, but no files in another directory. Is it possible to use the category-functionality here. Can I set categories dynamically on run-time??

    I will try to give an example:

    Peter is logged in, and has rights to see all my PDF on the subject of "Software Development", but he does not have sufficient rights to see my PDF's on the subject of "Web programming". How can I limit the result only to return the PDF's in my "Software Development" folder??

    Any ideas??

    Many thanks in advance!
    Eirik Hesthamar

  • #2
    You can limit results to specific folders using the categories option. However, this assumes that the categories are predetermined before indexing and that they would not change during run-time.

    I also assume that you actually want the "restricted files" to be available for some users, and that simply excluding them from the index is not an option.

    There are a few possibilities:

    a) Create multiple sets of index files and search pages for the different user groups as appropriate. Eg. One search page would only have access to "Web Programming", another would have access to both "Web programming" and "Software development". The disadvantage here is in maintaining multiple sets of index files - and the more access levels there are, the more sets of files required.

    b) Create categories such as:
    "Software Development PDFs"
    "Web Programming PDFs"

    Then you define your own search form in HTML and use a bit of server-side scripting to display the appropriate category option. Eg. When Peter is logged in, the page does not provide the "Web programming PDFs" drop-down. This however, is very meagre security, as it means that he has to simply guess the appropriate category parameter in the search URL to access the other categories.

    c) Modify the search script (PHP, ASP, JS?) to support your user authentication methods, and filter out URLs accordingly. This would require scripting knowledge. Note however, that we can not provide support for changes made to the search script by a third party.

    d) Pay us for custom development to implement the features you need exactly. E-mail us if you are interested in this and would like a quote (see the Contact Us page).
    --Ray
    Wrensoft Web Software
    Sydney, Australia
    Zoom Search Engine

    Comment

    Working...
    X