Skip to content

Commit

Permalink
docs: access control
Browse files Browse the repository at this point in the history
  • Loading branch information
0xShaito committed Nov 26, 2024
1 parent b7315b0 commit 7beffe1
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 0 deletions.
1 change: 1 addition & 0 deletions docs/src/SUMMARY.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@

- [Oracle](content/core/oracle.md)
- [Module](content/core/module.md)
- [AccessControl](content/core/access_control.md)

- [Modules](content/modules/README.md)

Expand Down
21 changes: 21 additions & 0 deletions docs/src/content/core/access_control.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
# AccessControl

The access control feature is designed to allow developers to write custom access control logic for users to interact with Prophet. Safeguarding interactions by ensuring only authorized entities can act on behalf of other users.

## IAccessModule
`IAccessModule` is the interface that defines the functions required for custom access modules.

See [IAccessModule.sol](/solidity/interfaces/core/access/IAccessModule.sol/interface.IAccessModule.md) for more details.

## ModuleAccessController
`ModuleAccessController` provides the needed validation for AccessModules. It validates both the approval of the custom AccessModule by the user and that the entitie interacting on behalf of the user has the correct authorization. This abstract contract should be implemented by any module that wants to leverage custom access control functionality.

See [IModuleAccessController.sol](/solidity/interfaces/core/access/IModuleAccessController.sol/interface.IModuleAccessController.md) for more details.


## OracleAccessController
Notice: This contract should NOT be used in the context of Modules as it does provide the correct validation needed for them.

`OracleAccessController` introduces an easy to use modifier for the Oracle contract that validates authorization for interaction within the Oracle.

See [IOracleAccessController.sol](/solidity/interfaces/core/access/IOracleAccessController.sol/interface.IOracleAccessController.md) for more details.

0 comments on commit 7beffe1

Please sign in to comment.