|
@@ -164,12 +164,16 @@ abstract contract AccessControl is Context {
|
|
|
* event. Note that unlike {grantRole}, this function doesn't perform any
|
|
|
* checks on the calling account.
|
|
|
*
|
|
|
- * Requirements:
|
|
|
- *
|
|
|
- * - this function can only be called from a constructor.
|
|
|
+ * [WARNING]
|
|
|
+ * ====
|
|
|
+ * This function should only be called from the constructor when setting
|
|
|
+ * up the initial roles for the system.
|
|
|
+ *
|
|
|
+ * Using this function in any other way is effectively circumventing the admin
|
|
|
+ * system imposed by {AccessControl}.
|
|
|
+ * ====
|
|
|
*/
|
|
|
function _setupRole(bytes32 role, address account) internal virtual {
|
|
|
- require(!address(this).isContract(), "AccessControl: roles cannot be setup after construction");
|
|
|
_grantRole(role, account);
|
|
|
}
|
|
|
|