# DEFAULT\_ADMIN\_ROLE functionality in Cairo

**URL:** <https://forum.openzeppelin.com/t/default-admin-role-functionality-in-cairo/41695>\
**Category:** Contracts\
**Tags:** cairo\
**Created:** [September 26, 2024, 12:30pm UTC](https://forum.openzeppelin.com/t/default-admin-role-functionality-in-cairo/41695 "2024-09-26T12:30:58Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Fernando\_Velazquez](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.openzeppelin.com/fernando_velazquez/32/21305_2.png) [@Fernando\_Velazquez](https://forum.openzeppelin.com/u/Fernando_Velazquez)\
**Post date:** [September 26, 2024, 12:30pm UTC](https://forum.openzeppelin.com/t/default-admin-role-functionality-in-cairo/41695/1 "2024-09-26T12:30:58Z")

</div>

Hello dear all,

In the Cairo documentation related to Access Control [https://docs.openzeppelin.com/contracts-cairo/0.15.0/access](https://docs.openzeppelin.com/contracts-cairo/0.15.0/access) it states that the DEFAULT\_ADMIN\_ROLE acts as the default admin role for all roles. An account with this role will be able to manage any other role, unless `_set_role_admin` is used to select a new admin role.

My question is that when we use the `_set_role_admin` to select a new admin role, if the DEFAULT\_ADMIN\_ROLE is still active there. If yes, I dont know if there are security recommendations on how to handle it because this controls all the roles and be dangerous.

Thanks in advance,

---

<div class="post-metadata">

**Author:** ![Skyge](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.openzeppelin.com/skyge/32/343_2.png) [@Skyge](https://forum.openzeppelin.com/u/Skyge)\
**Post date:** [October 2, 2024, 11:04am UTC](https://forum.openzeppelin.com/t/default-admin-role-functionality-in-cairo/41695/2 "2024-10-02T11:04:24Z")

</div>

> [@Fernando\_Velazquez](#):
>
> it states that the DEFAULT\_ADMIN\_ROLE acts as the default admin role for all roles. An account with this role will be able to manage any other role, unless `_set_role_admin` is used to select a new admin role.

Yes.

> [@Fernando\_Velazquez](#):
>
> My question is that when we use the `_set_role_admin` to select a new admin role, if the DEFAULT\_ADMIN\_ROLE is still active there.

I think no.  
There is a test case about this, you can have a look:

> <https://github.com/OpenZeppelin/cairo-contracts/blob/main/packages/access/src/tests/test_accesscontrol.cairo#L425C1-L432C2>

There is a solidity version that manages the `DEFAULT_ADMIN_ROLE` holder, maybe you can have a look:

> <https://github.com/OpenZeppelin/openzeppelin-contracts/blob/master/contracts/access/extensions/AccessControlDefaultAdminRules.sol>

---

<div class="post-metadata">

**Author:** ![Fernando\_Velazquez](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.openzeppelin.com/fernando_velazquez/32/21305_2.png) [@Fernando\_Velazquez](https://forum.openzeppelin.com/u/Fernando_Velazquez)\
**Post date:** [October 3, 2024, 11:26am UTC](https://forum.openzeppelin.com/t/default-admin-role-functionality-in-cairo/41695/3 "2024-10-03T11:26:39Z")

</div>

@Skyge Thanks a lot for your help!
