Open marcnaweb opened 10 years ago
Not out of scope, just more complex than it sounds.
Thanks : ) Actually, I did the restriction by adding a 'allowed_channels' field in the user model. Then I created:
before_filter :check_if_allowed,
with
def check_if_allowed
if current_user.allowed_channels.split(',').include?(params[:channel_id].to_s)
return true
else
return false
end
end
I modify all the rest accordingly, but got stuck in the 'people' and bot 'connected/disconnected' side of the app. would you like that I send you the code? --> it just a starting point, but might help if you plan to implement so.
If you could submit a pull request, we can go ahead and mark it as a "incoming" feature, and we can help. :)
ok, done the "pull request". Thanks for all!.. ;)
The idea is to restrict user to certain channels defined by the admin. I tried to do so by my own and went well on restricting the channels to be accessed / updated by "non-authorized users", however, I can't see a way to avoid users from appearing in the people side bar / in the bot 'connected / disconnected' activity if they don't access the same channel as the 'current user'. What do you think? (any suggestion/ is this out of scope of this project?)