Restrict modules to selfhost installs

This commit is contained in:
Hillel Coren 2018-03-29 22:26:44 +03:00
parent 24e4d2d418
commit 90289fc018
2 changed files with 24 additions and 20 deletions

View File

@ -759,6 +759,7 @@ class AccountController extends BaseController
$account = $user->account;
$modules = Input::get('modules');
if (Utils::isSelfHost()) {
// get all custom modules, including disabled
$custom_modules = collect(Input::get('custom_modules'))->each(function ($item, $key) {
$module = Module::find($item);
@ -772,6 +773,7 @@ class AccountController extends BaseController
$item->disable();
}
});
}
$user->force_pdfjs = Input::get('force_pdfjs') ? true : false;
$user->save();

View File

@ -189,6 +189,7 @@
</label>
</div>
@endforeach
@if (Utils::isSelfHost())
@foreach (Module::all() as $value)
{{ ($value->boot()) }}
<div class="checkbox">
@ -197,6 +198,7 @@
</label>
</div>
@endforeach
@endif
</div>
</div>
<div class="form-group">