diff --git a/contracts/core/access/AccessControlled.sol b/contracts/core/access/AccessControlled.sol index 35d15aee..d0c83bfe 100644 --- a/contracts/core/access/AccessControlled.sol +++ b/contracts/core/access/AccessControlled.sol @@ -46,7 +46,7 @@ contract AccessControlled { } // Access Controlled Functions - function setAccessControl(IAccessControl newAccessControl) external { + function setAccessControl(IAccessControl newAccessControl) external virtual { _accessControl().requireCanChangeAccessControl(msg.sender); newAccessControl.verifyHasAccessFunction(); _setAccessControl(newAccessControl); diff --git a/contracts/dashboard/primitives/feed/DashboardFeed.sol b/contracts/dashboard/primitives/feed/DashboardFeed.sol new file mode 100644 index 00000000..a7252d16 --- /dev/null +++ b/contracts/dashboard/primitives/feed/DashboardFeed.sol @@ -0,0 +1,18 @@ +// SPDX-License-Identifier: UNLICENSED +// Copyright (C) 2024 Lens Labs. All Rights Reserved. +pragma solidity ^0.8.0; + +import {Feed} from "@core/primitives/feed/Feed.sol"; +import {IAccessControl} from "@core/interfaces/IAccessControl.sol"; + +contract DashboardFeed is Feed { + constructor(string memory metadataURI, IAccessControl accessControl) Feed(metadataURI, accessControl) { + require(accessControl.getType() == keccak256("lens.access-control.owner-admin-only-access-control")); + } + + // TODO: Make internal function so can be overridden and called with super._setAccessControl... + function setAccessControl(IAccessControl newAccessControl) external override { + require(newAccessControl.getType() == keccak256("lens.access-control.owner-admin-only-access-control")); + super.setAccessControl(newAccessControl); + } +}