Forum

JiFile for Joomla!

JIFile
JiFile is a component for Joomla! that allows you to index file contents (PDF, DOC, etc..) to perform searches in them.

Learn more...  Demo

JoomPhoto Mobile

JPhotoMobile
JoomPhoto Mobile is a component for Joomla! that allows you to share the photos from your Android device to your site Joomla.

Learn more...  Demo

iFile Framework

IFile
IFile is an open source framework written entirely in PHP, allows the indexing of textual content of a document (DOC, PDF, EXCEL, etc.) and a quick search within them.

Learn more...  Demo

Easy Language

EasyLanguage
Easy Language is a plugin for easy and immediate management of multilingual texts in every possible area of joomla, articles, components, modules, metadata, template, other components(example K2) etc.

Learn more...

Article Book Effect

Article Book Effect
View Joomla articles with the effect turns the page of a book. This plugin will display the contents of an article in Joomla as a real book or magazine, using all the benefits of HTML5

Learn more...  Demo

 

Passport photo

Passport photo
The most popular Android app that allows you to print photos cards for your documents with your Android smartphone, in a simple and intuitive way.

Learn more...

 

Crazy Shadow

Crazy Shadow
Crazy Shadow is the 3D fast-paced and fun puzzle Android game! Try to rotate and drag shapes in the position of their shadows without fail! Solve in succession all combinations of levels of the game.

Learn more...

 

Admin Countdown

Admin Countdown
Module for Joomla! 2.5 and 3.x displays in the administration part of the site, a timer with countdown of the time remaining in your session.

Learn more...  Demo

 
Welcome, Guest
Username: Password: Remember me

TOPIC: restrict searchable docs to registred people

restrict searchable docs to registred people 16 Oct 2012 22:05 #697

  • nabbo
  • nabbo's Avatar
  • OFFLINE
  • Fresh Boarder
  • Posts: 15
Hello

I have indexed some files on my joomla installation, but I wonder if there is any way to restrict the file contents to registred people only.

I mean some indexed file in a folder may be "public" (viewable by anyone) and another folder would be private (viewable by only registred people)

I'm thinking of different folders for spliting public/private, but there may be another way ?

Thanks
Nabbo
The administrator has disabled public write access.

Re: restrict searchable docs to registred people 17 Oct 2012 12:17 #700

  • Antonio
  • Antonio's Avatar
  • OFFLINE
  • Administrator
  • Posts: 486
  • Thank you received: 66
For the moment there is no solution to your problem, certainly in the future we would like to integrate it.
If you like, if it was useful, consider a donation, Thanks
Se vuoi, se ti siamo stati utili, considera una donazione, Grazie
Help us by voting our extensions on Joomla.org:
JiFile
JoomPhoto Mobile
Easy Language
The administrator has disabled public write access.

Re: restrict searchable docs to registred people 17 Oct 2012 13:45 #702

  • nabbo
  • nabbo's Avatar
  • OFFLINE
  • Fresh Boarder
  • Posts: 15
Hi, and thanks for the reply.

I have found quick-and-dirty way of doing (more or less) what I want :

assuming the fact that your "private" documents are in a folder named "private" :

I have edited the file :
plugins/search/jifile/jifile.php, and added at line 97 , after
$pathD = jifilehelper::getCorrectFilename($doc->getFieldValue('path'));

the following :
$user =& JFactory::getUser();
if(!$user->id and preg_match('/.*\/private/',$pathD)) $pathD=false;

it looks like it does what I want :
  • no result is found if I'm not logged in
  • results are found if I am

What do you think ?
On your opinion, is there a security leak somehow if I do that ?

Thanks
The administrator has disabled public write access.

Re: restrict searchable docs to registred people 17 Oct 2012 14:00 #703

  • Antonio
  • Antonio's Avatar
  • OFFLINE
  • Administrator
  • Posts: 486
  • Thank you received: 66
It 'a good solution, static, but I see no problems
If you like, if it was useful, consider a donation, Thanks
Se vuoi, se ti siamo stati utili, considera una donazione, Grazie
Help us by voting our extensions on Joomla.org:
JiFile
JoomPhoto Mobile
Easy Language
The administrator has disabled public write access.

Re: restrict searchable docs to registred people 30 Apr 2013 21:38 #1185

I was initially excited to find this solution but disappointed when I tried it. Non-registered users can still find documents for registered-only users and open them.

I changed "private" in the sample text to my documents folder. Is there something else that needs to be changed? JFactory is a mystery to me. Is that a plugin that needs to be installed too?

Thanks for trying to fix this troublesome issue with an otherwise wonderful tool.
The administrator has disabled public write access.

Re: restrict searchable docs to registred people 01 May 2013 00:17 #1186

  • Giampaolo
  • Giampaolo's Avatar
  • OFFLINE
  • Administrator
  • Posts: 465
  • Thank you received: 43
Hi,
we implemented a ACL feature in JiFile 2.0, but you can, simply, go to in Plugin Manager and set:

"Search - Jifile" as "Registered"

This image is hidden for guests. Please log in or register to see it.


Now your document are searchable only for user Registrered and logged in your site.

For your case, all user can search, and only Registrered user open, than contact us at:

This email address is being protected from spambots. You need JavaScript enabled to view it.

and write in object, the this topic object
If you like, if it was useful, consider a donation, Thanks
Se vuoi, se ti siamo stati utili, considera una donazione, Grazie
Help us by voting our extensions on Joomla.org:
JiFile
JoomPhoto Mobile
Easy Language
Last Edit: 01 May 2013 00:21 by Giampaolo.
The administrator has disabled public write access.