# Selectively hiding a Kernel

**URL:** <https://discourse.jupyter.org/t/selectively-hiding-a-kernel/23902>\
**Category:** General\
**Tags:** help-wanted\
**Created:** [February 12, 2024, 11:53am UTC](https://discourse.jupyter.org/t/selectively-hiding-a-kernel/23902 "2024-02-12T11:53:23Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![pgierz](https://yyz1.discourse-cdn.com/flex031/user_avatar/discourse.jupyter.org/pgierz/32/1930_2.png) [@pgierz](https://discourse.jupyter.org/u/pgierz)\
**Post date:** [February 12, 2024, 11:53am UTC](https://discourse.jupyter.org/t/selectively-hiding-a-kernel/23902/1 "2024-02-12T11:53:23Z")

</div>

Hello,

I’,m trying to selectively hide a kernel based on a whitelist. So far, I have something like this:

```python
c = get_config()
c.KernelSpecManager.whitelist = {...}
if jupyterhub_user in MATLAB_USERS:
    c.KernelSpecManager.whitelist += "matlab_kernel"

```

I think what I actually want to do is something with “scopes” in the role dictionary…? I’m not entirely sure though.

How would one best go about configuring this? Effectively I want a kernel to be available to a specific group of users which I can administer separately.

Thanks for any hints!  
Paul
