[eluser]Tom Vogt[/eluser]
My problem:
I have a (fairly large) number of modules that handle my app.
I have a (small) number of navigation and action pages to access those modules.
So, for example, I have one navigation page that lets me access module A, function 1, 2 and 5, module B.1, B.2, B.3 and C.2, C.3 while another action page gives me A.1, A.2, B.4, B.5, B.6 - note the overlap.
Finally, those actions are not always available. Depending on the user's status, access rights, and current location/action, etc. they may or may not be there. In most cases, I want to show them if they are not available, but "greyed out".
Now here's the problem:
How to code all this without duplicating the "can I do this right now" checks all the time? My dream would be a query functionality - that I can query my controllers to check and report which actions they a) supply and b) are available right now.
Is that even possible with CI?