By Jostein Rosenlund on Monday, 30 December 2013
Replies 6
Likes 0
Views 1.2K
Votes 0
Hello,

The apps i create, they need to only be accessible by certain groups of users.

How can I implement security functions into the app, (the entire apps, as well as parts of the app.

I know that i can do

if( $user->isViewer() )
{
print $content.
}
else
{
Echo "no access";
}

To hide it from other users, than the one that has installed it. But I want to do this whit the entire app.
And i prefer to do it outside the view, so if the criteria are not met, the app is hidden for the user logged in or the guest account viewing the profile of the user that have installed the app.
Hello Jostein,

Sorry but unfortunately this isn't available yet currently. You should do these checks within the views respectively. Perhaps there should be a method called "isAllowed" in the app which is the global registry that determines if the user is allowed to access the app or not.
·
Monday, 30 December 2013 11:41
·
0 Likes
·
0 Votes
·
0 Comments
·
I wrap the view.html.php inside an:

    $user 	= Foundry::user( $userId );
if( $user->isViewer() )
{ content of the view.html.php};


are there some way i can put this statement in the SocialUserApp class?
(that will hide the existence of the app, if the conditions are not meet?)
·
Monday, 30 December 2013 19:40
·
0 Likes
·
0 Votes
·
0 Comments
·
I guess ES fetches the status of applications from the SQL DB, are there someway to manipulate this data. so ES does not think that the app exist?
·
Monday, 30 December 2013 19:55
·
0 Likes
·
0 Votes
·
0 Comments
·
Sorry but I am not too sure what you are trying to achieve here.
·
Monday, 30 December 2013 22:10
·
0 Likes
·
0 Votes
·
0 Comments
·
well, were in the code does easysocial tell joomla that a application exist?
·
Thursday, 02 January 2014 18:27
·
0 Likes
·
0 Votes
·
0 Comments
·
Hi,

The codes are in the core /administrator/com_easysocial/includes/apps/ but I wouldn't suggest you to modify the core codes.

Where are you looking to hide the app based on your conditions?
·
Thursday, 02 January 2014 18:36
·
0 Likes
·
0 Votes
·
0 Comments
·
View Full Post