- Posts: 59
- Thank you received: 0
All questions about EDocman extension
Yeat another question about permissions
- Krx
-
Topic Author
- Offline
- Senior Member
-
Less
More
5 years 2 months ago #132171
by Krx
Yeat another question about permissions was created by Krx
Hello
Is it possible to set documents to be seen by public but downloadable only for register users?
If yes please explain how.
At the moment if I set category or document to registered, when search with edocman search module is performed
search action on that category doesn't show any document.
Our goal is to set system in that way so that documents from specified category are visible to all visitors,
but downloadable only for registered users.
Thanks
Regards
Is it possible to set documents to be seen by public but downloadable only for register users?
If yes please explain how.
At the moment if I set category or document to registered, when search with edocman search module is performed
search action on that category doesn't show any document.
Our goal is to set system in that way so that documents from specified category are visible to all visitors,
but downloadable only for registered users.
Thanks
Regards
Please Log in or Create an account to join the conversation.
- John Kaminski
- Offline
- Junior Member
-
Less
More
- Posts: 35
- Thank you received: 0
4 years 8 months ago #136779
by John Kaminski
Replied by John Kaminski on topic Yeat another question about permissions
I have a similar question. Did you get a reply you can share with me?
John
John
Please Log in or Create an account to join the conversation.
- Krx
-
Topic Author
- Offline
- Senior Member
-
Less
More
- Posts: 59
- Thank you received: 0
4 years 8 months ago #136780
by Krx
Replied by Krx on topic Yeat another question about permissions
Hi
No but I've found the solution by myself by overriding Edocman component output with some custom coding. Basically I did this:
I've set Edocman category to public and added this php code in my Component override file
So if visitors are not logged they can see only file titles. And if they are logged in they can download.
Regards
No but I've found the solution by myself by overriding Edocman component output with some custom coding. Basically I did this:
I've set Edocman category to public and added this php code in my Component override file
Code:
$user = JFactory::getUser();
$groups = $user->groups;
if ($groups[2] || $groups[7] || $groups[8]){
show Edocman component default code - file title and download button
}else{
show Edocman file title without download button and
custom message which asks user to login or register before downloading
}
/*
2 - registered users
7 - administrators
8 - super users
*/
So if visitors are not logged they can see only file titles. And if they are logged in they can download.
Regards
Please Log in or Create an account to join the conversation.
Moderators: Mr. Dam
Support
Documentation
Information
Copyright © 2025 Joomla Extensions by Joomdonation. All Rights Reserved.
joomdonation.com is not affiliated with or endorsed by the Joomla! Project or Open Source Matters.
The Joomla! name and logo is used under a limited license granted by Open Source Matters the trademark holder in the United States and other countries.
The Joomla! name and logo is used under a limited license granted by Open Source Matters the trademark holder in the United States and other countries.