Hello Guys thank you for taking the time to check out my question.
So to explain a bit as the title might not do the question justice,
I would like to learn the best way i can go about setting a method that checks for role and if it's admin then go ahead to let the person into actioncable chat if not then block all connections.
So to sum it all up: as this is real time i guess i need to have some kind of start check in the js part of actioncable room/connection handler and then in the ruby side of the things.
I do not want a full run down as this would be to much to ask from you.
just a small stepping stone.
devise is used for account handling and i have made my simple roles system.
i use redis to handle the background job for creating a message.
My first simple approach to this was just check the role before create action to the message but that still leaves a connection open to the actioncable/redis/chat.
As mentioned any pointers would be greatly appreciated
Thank you in advance.