View Full Version : User rights, categories and plugin....
hessner
02-15-2007, 05:49 PM
All my pages contain Categories telling what userroles may see the page. I automatic set the categories when searching my index - so the result will match the users rights.
This is working out perfect.
Now, my users want to index .DOC and .PDF documents to.
Documents should follow the same rules.
How do I implement this?
Can .DOC and .PDF documents inherit the page(URL) category somehow :confused:
Regards
Hessner
Categories are determined only by URL or the ZOOMCATEGORY meta tag contained within the file.
But what you can do, is change the links to your PDF/DOC files, so that they contain text in the URL that can be used to match the category.
For example, on your page for "admins", you can link to all your files like so:
http://www.mysite.com/docs/mydocument.doc?cat=admins
You can then create a category which match by "cat=admins" in the URL.
When the user clicks on the link from the browser, the parameter would be ignored and it will open the document normally.
I should add, of course, that using categories to enforce access restriction is not very secure. An user can simply change the zoom_cat parameter to access the other categories, even if you don't make the dropdown option available. You would need to have authentication/access restriction mechanisms elsewhere on the site (eg. on the actual content pages, or using HTTP authentication), or be willing to accept the lack of security this method offers.
A more secure method would be to have separate sets of index files for each user group, and only providing access for an authenticated user to their corresponding set of search files.
hessner
02-15-2007, 11:11 PM
I control the querystring to Win32_search.cgi. I build it, in codebehind, according to the users roles. If he tries to alter it, I will remove any roles not found on his profile.
Regards
Hessner
Powered by vBulletin® Version 4.1.12 Copyright © 2012 vBulletin Solutions, Inc. All rights reserved.