# Block namespace creation for users inside project

**URL:** <https://forums.suse.com/t/block-namespace-creation-for-users-inside-project/39518>\
**Category:** SUSE Rancher Prime\
**Created:** [November 22, 2022, 3:48pm UTC](https://forums.suse.com/t/block-namespace-creation-for-users-inside-project/39518 "2022-11-22T15:48:22Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![plop](https://avatars.discourse-cdn.com/v4/letter/p/d9b06d/32.png) [@plop](https://forums.suse.com/u/plop)\
**Post date:** [November 22, 2022, 3:48pm UTC](https://forums.suse.com/t/block-namespace-creation-for-users-inside-project/39518/1 "2022-11-22T15:48:22Z")

</div>

For security reasons **we don’t want our users to be able to create namespaces inside their project.**  
Unfortunatly we can’t find a way to block this feature…

Namespace creation is a clusterRole called `create-ns` bound to users by clusterRoleBindings of the same name. Deleting thoses ressources makes no difference as Rancher auto-recreates them immediately.

Any help would be greatly appreciated  
Thx in advance

---

<div class="post-metadata">

**Author:** ![plop](https://avatars.discourse-cdn.com/v4/letter/p/d9b06d/32.png) [@plop](https://forums.suse.com/u/plop)\
**Post date:** [November 28, 2022, 1:46pm UTC](https://forums.suse.com/t/block-namespace-creation-for-users-inside-project/39518/2 "2022-11-28T13:46:41Z")

</div>

Found the solution. Not thanks to Rancher’s documentation…

To prevent users from adding namespaces themselves you can edit a particular CRD ressource from Rancher.

```auto
kubectl edit roletemplates.management.cattle.io project-member

```

Inside remove all references to namespaces.

In the UI the “create namespace” button will disappear.
