Different authorizators for front and admin

Notice: This thread is very old.
zimmi
Member | 94
+
0
-

Hi,
I would like to keep authorization rules for front and admin module in two separate tables. Would it be possible to consider table name when creating authorizator via config.neon?
Right now I use AuthorizatorFactory with create() method returning \Nette\Security\IAuthorizator and config.neon written like this:

authorizatorFactory: App\Model\AuthorizatorFactory
authorizator: @authorizatorFactory::create

Is it possible to do something like?

authorizatorFactory: App\Model\AuthorizatorFactory
authorizatorFront: @authorizatorFactory::create('front')
authorizatorAdmin: @authorizatorFactory::create('admin')
Majkl578
Moderator | 1364
+
0
-

What about similar implementation as in existing multi authenticator?

zimmi
Member | 94
+
0
-

Thanks for the link, I'll look into it. I was planning to use multi authenticators as well anyway, so it could be similar.