You can disable registration (and authentication through third-party providers) if that's what you mean.
Personally I'd rather use gitea though. It has a more healthy development community (as in more than one developer) and is gaining new functionality at decent pace.