One database sharing multiple apps

Got something cool to share with AppGini users? Feel free to post it here!
Post Reply
wilmira
Veteran Member
Posts: 67
Joined: 2013-07-11 18:00

One database sharing multiple apps

Post by wilmira » 2014-09-29 17:22

Hello,

I have one database and 2 apps. as follow:
App1: invoice1, user1
App2: invoice2, user2

Right now, every user can access both apps.

Is it possible to prevent user1 to access invoice2 app. and also prevent user2 to access invoice1 app.?

Thanks in advance

Wilfredo

udayvatturi
AppGini Super Hero
AppGini Super Hero
Posts: 85
Joined: 2014-06-14 03:08
Location: India
Contact:

Re: One database sharing multiple apps

Post by udayvatturi » 2014-09-30 02:59

Hi Wilfredo,
You can do that using global hooks.
http://bigprof.com/appgini/help/advance ... obal-hooks

you can write some condition there in login_ok method and return the logout url. This way you can restrict certain users to login.

Code: Select all

function login_ok($memberInfo, &$args){

        if($memberInfo['username']=="a")
	return 'http://localhost/hms/index.php?signOut=1';
        else
        return "";
}

wilmira
Veteran Member
Posts: 67
Joined: 2013-07-11 18:00

Re: One database sharing multiple apps

Post by wilmira » 2014-10-08 20:58

Thank you very much Uday,

This is exactly what I was looking for. It works like charm!!

Wilfredo

Post Reply