Login plugin - Serve different modules/different data to different users

Hi everyone,

I have a question about Login plugin - is there a way to serve content to users based on their userdata?

Example: I am hosting an event, one guy in the crew works on applications, other handles already admitted people, third works with statistical data on how many applied/were admitted. I’d like to have sort of a Control panel hosted on mysite.com/cp, accessible to those with user accounts only, where each of the crew will be served data that he needs: first guy will get a table of new applicants, second - a table of those who were admitted by the first one, and the third will see a chart of the progress made by the first two.

Can I get that with something that already exists (Grav inherent functions/Login plugin capabilities/other plugins)? I think it is possible by making /cp modular and setting up module load rules based on userdata, but I can’t quite figure out the way to do it.

Best regards,

If anyone will get a similar question in future - I think I found a good way to do what I needed: variable grav.user.username, as well as other grav.user.### variables can be accessed and compared to the string via “same as”, using “if” statement you can write a template that will serve some content only to certain users.
Maybe there is a better way to do what I want, but this one seems to work well. Don’t forget to disable caching for such pages.

You can integrate such stuff into the Admin plugin as an add-on. Admin plugin knows about permission groups and users can be owners of different permissions, e.g. admin.super or admin.eventcharts. Obviously this needs some programming, you need a dedicated add-on plugin for your event management.