1

we are developing site (unfortunately on Joomla), where we need to restrict access to some content - articles (and also categories if possible).

Ideally, this content should be hidden even from menu. It will be enough if we were able to specify three access levels for our articles:

  • public visibility
  • visible only for intranet
  • visible only for extranet

Unfortunately we found no extension that could meet our requirements. Do you have any suggestions, where we should implement this IP filter (detect IP address and check if it is from intranet or extranet is simple task, but we are quite new to Joomla API).

Jeffrey Greenham
  • 1,382
  • 5
  • 16
  • 33
matussvk
  • 45
  • 1
  • 1
  • 7
  • think your best bet might be to make a small system plugin which you could embed on your selected articles. would recommend looking at Joomla Docs to see how plugins are developed. – Lodder May 15 '12 at 23:49
  • Are your public items for non-logged in users and your visible for intranet/extranet for logged in users? – Craig May 16 '12 at 00:30
  • Thanks for suggestions, I will check that Lodder, maybe we will be able to customize it to reach our needs. Extranet and Intranet users can be in a role of not logged in and logged in user, but we dont want users to log in to our site. – matussvk May 16 '12 at 19:23
  • Sorry Lodder, I meant I will check some extensions. It looks that we definitely need to learn about joomla plugins development. – matussvk May 16 '12 at 19:31

1 Answers1

0

Approach 1 would be a System plugin, as @Lodder suggested. It would pick $_SERVER['REMOTE_ADDR'] (check this, as if you're behind a proxy, another variable might need checking - like X-FORWARDED-FOR or another). Then you can check it vs. conditions set for the article or category — yet to decide how exactly you would mark a particular article as 'Intranet only'. In case of 'access denied' just redirect visitors to the home page. All articles would be open to all by default, and can be market either 'intranet' or 'extranet'.

Approach 2 would be to have two sites instead of one, sharing same database. They can use individual template files, picking different module positions to place menus. Thus there will be two sets of menus in the system: one for Intranet, one for Extranet. Of course in this case anyone with a correct link would be able to access any article, no matter what IP he comes from. So its just a decoration.

Serge
  • 1,531
  • 2
  • 21
  • 44
  • Thanks for suggestion, I will check that Lodder first, for administration purposes it will be simpler to have just one page. But your second suggested approach looks quite simple and effective, maybe this will be an ideal way how to implement this very fast. – matussvk May 16 '12 at 19:26