minimize the numer of queries to database while checking permissions #43

Closed
wants to merge 1 commit into
from

Projects

None yet

5 participants

@isaiahdw
Kohana PHP Framework member

This needs to be updated for the Kohana coding styles. See: http://kohanaframework.org/3.2/guide/kohana/conventions

Also I'm not sure selecting all the roles every time is a good idea. It seems like it would be better to just select the roles they requested, and cache those results. If they request a role that isn't in the cache you would do a lookup. I guess the way you have it makes sense though if the goal is to avoid extra database queries (remember duplicate queries can be cached anyway, so the overhead is low).

@kiall

Apologies, Just restored CI server from backup .. Its not quite fixed yet ;) Ignore those last messages!

!build

@kemo
Kohana PHP Framework member

I am not sure how I feel about this, especially since it's targeted for 3.2/develop. There are applications which heavily rely on roles and we might also be able to have instances of the same model using different databases in one of the next releases. Closing this 'for now' because of the target version and conventions (conditions inside of conditions with terminating commands).

I'll be glad to re-open it if there is interest.

@kemo kemo closed this Apr 11, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment