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: 39
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: 1281
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 :)
:idea: AppGini plugins to add more power to your apps:
  • DataTalk is an innovative AppGini plugin based on ChatGPT that allows you to interact with your AppGini database using natural language questions, without writing any SQL. Check the demo video
  • Mass Update plugin: Update multiple records at once and improve your workflow efficiency.
  • Check our other plugins and get a generous discount of up to 30% when buying 2 or more plugins.

Post Reply