Camera icon visible on log in page

Our discourse platform is user restricted. The camera icon and the drop down list of video content is visible to any visitor before they log in. That is a security problem. How do we restrict that camera icon to the logged in part of the site?

1 Like

The code that adds the camera icon and video sidebar is going to have to check to see if the user is logged. That way the icon and video list can be configured to only be displayed for logged in users.

How have you added the camera icon to the site? Was it done with theme component that you have developed?


I don’t understand the above.

The camera icon was added with a youtube theme component.

1 Like

That’s helpful! The theme component that you’re using is here: Possibly we can come up with a way of preventing the player’s icon and sidebar from being displayed for non-logged in users on sites that require users to log in.

@johani, do you know if this would be difficult to do?

Edit: it looks like all that needs to be done to prevent the camera icon from displaying for non-logged in users is to add the following CSS to your site’s theme or to a theme component:

.anon a#idle-toggle {
    display: none;

I haven’t generated a Youtube API key, so am not able to fully test this out on my site. @Valerie_Marcel I think that you have the Youtube theme component installed on a Discourse site that is hosted by us. Let us know if you’d like a hand with adding that CSS to your site’s theme.


Thanks for the fix, Simon!