Custom Links on Home by USER

Wish to see a specific feature/change in future releases? Feel free to post it here, and if it gets enough "likes", we'd definitely include it in future releases!
Post Reply
User avatar
naturick
Veteran Member
Posts: 34
Joined: 2014-07-07 18:47
Location: Cluj-Napoca
Contact:

Custom Links on Home by USER

Post by naturick » 2018-08-06 15:28

Hello. pböttcher just solved me a problem. I think that it can be implemented on Appgini core.

I needed to restrict visability of some custom links in home page to a specific USER.

USER is memmebr of a GROUP that I didn't want to show links to.

Actually Appgini allow this restriction by GROUP.

Solution is very easy:

What you can do, if you need this, you can add

Code: Select all

'users' => array('user1', 'users'), // array of users allowed to see the custom link
in the links-home.php

and change the following in the incCommon.php file (get_home_links function // arround line 1300)

Code: Select all

if($memberInfo['admin'] || @in_array($memberInfo['group'], $link['groups']) || @in_array('*', $link['groups'])){
to

Code: Select all

if($memberInfo['admin'] || @in_array($memberInfo['group'], $link['groups']) || @in_array('*', $link['groups']) || @in_array($memberInfo['username'], $link['users'])){


Of course this change will be overwritten every time application is recreated/published.

User avatar
a.gneady
Site Admin
Posts: 914
Joined: 2012-09-27 14:46
Contact:

Re: Custom Links on Home by USER

Post by a.gneady » 2018-08-23 14:16

Thanks for sharing, @naturick. I've added this to our backlog to implement it in future releases :)
AppGini: Responsive, collaborative web db apps in minutes.
:idea: Learn all the tips and tricks of customizing AppGini apps through our online course.

Post Reply