Change access folder structure (#4359)

Co-authored-by: Hadrien Croubois <hadrien.croubois@gmail.com>
Co-authored-by: Francisco <fg@frang.io>
This commit is contained in:
Renan Souza
2023-07-13 18:54:22 -03:00
committed by GitHub
parent 84db204a41
commit 9cf873ea14
8 changed files with 20 additions and 11 deletions

View File

@ -0,0 +1,5 @@
---
'openzeppelin-solidity': major
---
`access`: Move `AccessControl` extensions to a dedicated directory.

View File

@ -8,7 +8,7 @@ This directory provides ways to restrict who can access the functions of a contr
- {AccessControl} provides a general role based access control mechanism. Multiple hierarchical roles can be created and assigned each to multiple accounts.
- {Ownable} is a simpler mechanism with a single owner "role" that can be assigned to a single account. This simpler mechanism can be useful for quick tests but projects with production concerns are likely to outgrow it.
== Authorization
== Core
{{Ownable}}
@ -18,8 +18,12 @@ This directory provides ways to restrict who can access the functions of a contr
{{AccessControl}}
== Extensions
{{IAccessControlEnumerable}}
{{AccessControlEnumerable}}
{{IAccessControlDefaultAdminRules}}
{{AccessControlDefaultAdminRules}}

View File

@ -3,11 +3,11 @@
pragma solidity ^0.8.19;
import {AccessControl, IAccessControl} from "./AccessControl.sol";
import {IAccessControlDefaultAdminRules} from "./IAccessControlDefaultAdminRules.sol";
import {SafeCast} from "../utils/math/SafeCast.sol";
import {Math} from "../utils/math/Math.sol";
import {IERC5313} from "../interfaces/IERC5313.sol";
import {AccessControl, IAccessControl} from "../AccessControl.sol";
import {SafeCast} from "../../utils/math/SafeCast.sol";
import {Math} from "../../utils/math/Math.sol";
import {IERC5313} from "../../interfaces/IERC5313.sol";
/**
* @dev Extension of {AccessControl} that allows specifying special rules to manage

View File

@ -4,8 +4,8 @@
pragma solidity ^0.8.19;
import {IAccessControlEnumerable} from "./IAccessControlEnumerable.sol";
import {AccessControl} from "./AccessControl.sol";
import {EnumerableSet} from "../utils/structs/EnumerableSet.sol";
import {AccessControl} from "../AccessControl.sol";
import {EnumerableSet} from "../../utils/structs/EnumerableSet.sol";
/**
* @dev Extension of {AccessControl} that allows enumerating the members of each role.

View File

@ -3,7 +3,7 @@
pragma solidity ^0.8.19;
import {IAccessControl} from "./IAccessControl.sol";
import {IAccessControl} from "../IAccessControl.sol";
/**
* @dev External interface of AccessControlDefaultAdminRules declared to support ERC165 detection.

View File

@ -3,7 +3,7 @@
pragma solidity ^0.8.19;
import {IAccessControl} from "./IAccessControl.sol";
import {IAccessControl} from "../IAccessControl.sol";
/**
* @dev External interface of AccessControlEnumerable declared to support ERC165 detection.

View File

@ -2,7 +2,7 @@ const { time, constants, expectRevert } = require('@openzeppelin/test-helpers');
const {
shouldBehaveLikeAccessControl,
shouldBehaveLikeAccessControlDefaultAdminRules,
} = require('./AccessControl.behavior.js');
} = require('../AccessControl.behavior.js');
const AccessControlDefaultAdminRules = artifacts.require('$AccessControlDefaultAdminRules');

View File

@ -2,7 +2,7 @@ const {
DEFAULT_ADMIN_ROLE,
shouldBehaveLikeAccessControl,
shouldBehaveLikeAccessControlEnumerable,
} = require('./AccessControl.behavior.js');
} = require('../AccessControl.behavior.js');
const AccessControlEnumerable = artifacts.require('$AccessControlEnumerable');