Live changes on Permission/Rule

Notice: This thread is very old.
sansumaki
Member | 2
+
0
-

Hello

I have a problem with the Authentication.

I have a class that extends from Nette\Object and implements Nette\Security\IAuthenticator with the method authenticate(array $credentials).

When a user is logged in with rule Admin and at the same time i change the rule of that user or remove the user, then the user stays logged in and hold his rules.

What should i do to refresh rule and permission on live changes?

Jan Tvrdík
Nette guru | 2595
+
0
-

If you need to check the rules or user existence on every request then just do it, e.g. in startup.

sansumaki
Member | 2
+
0
-

Jan Tvrdík wrote:

If you need to check the rules or user existence on every request then just do it, e.g. in startup.

Thanks for your reply.

But, what do you mean with ‘startup’?

Should i check on any startup, manualy if rule and user match and when doesn't call logout() for example?