# Use access control accross multiple contracts

**URL:** <https://forum.openzeppelin.com/t/use-access-control-accross-multiple-contracts/14928>\
**Category:** Contracts\
**Created:** [September 2, 2021, 7:48am UTC](https://forum.openzeppelin.com/t/use-access-control-accross-multiple-contracts/14928 "2021-09-02T07:48:35Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![viraj124](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.openzeppelin.com/viraj124/32/2408_2.png) [@viraj124](https://forum.openzeppelin.com/u/viraj124)\
**Post date:** [September 2, 2021, 7:48am UTC](https://forum.openzeppelin.com/t/use-access-control-accross-multiple-contracts/14928/1 "2021-09-02T07:48:35Z")

</div>

Hi,

I had a small question related to the access control mechanism [https://docs.openzeppelin.com/contracts/3.x/access-control#role-based-access-control](https://docs.openzeppelin.com/contracts/3.x/access-control#role-based-access-control)

does the role remain relevant from one contract context to another i.e if I have 1 main contract and assign an admin role there and call another contract so can I use

require(hasRole(DEFAULT\_ADMIN\_ROLE, msg.sender), "Caller is not a burner");  
inside a function in another contract ?

---

<div class="post-metadata">

**Author:** ![maxareo](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.openzeppelin.com/maxareo/32/11606_2.png) [@maxareo](https://forum.openzeppelin.com/u/maxareo)\
**Post date:** [September 2, 2021, 11:27am UTC](https://forum.openzeppelin.com/t/use-access-control-accross-multiple-contracts/14928/2 "2021-09-02T11:27:46Z")

</div>

I think the answer is no. You may have noticed `AccessControl` is an abstract contract. State variables and functions only exist in the scope of the contract that inherits from it. Other contracts do not share state variables with this contract. However, if an `AccessControl` mechanism is desired to be established across smart contracts, `AccessControl` contract can be inherited by an external storage contract so that all other contracts in this dapp would share common state variables, of course including role variables.
