drezy hi. Most forum owners use cases can be achieved with Flarum's built-in features and community extensions.
Flarum ships with the "View discussions" permission that allows you to restrict which users have access to discussions. You can set it up to "members" to require login/registration, or to a custom group that you give to trusted users.
There's also a community extension to restrict registration to invited users.
If you need more advanced features that extensions don't offer, the Flarum extension API is quite powerful. You shouldn't edit Flarum source code directly as it will likely make it complicated to update later on and we can't easily assist with forked Flarum versions. The extension API can be used locally from extend.php or by creating a private extension.