mirror of
https://github.com/clusterio/clusterio.git
synced 2026-11-13 15:14:52 +09:00
Merge pull request #1045 from bbassie/feature/role-page-extension-slot
Add a role page extension slot above the permissions
This commit is contained in:
1 parent
2efb53aab1
commit
793f23a390
2 files changed
+9
No files matched your search
@@ -123,6 +123,13 @@ export type ExtensionSlotProps = {
|
||||
role: lib.Role;
|
||||
search?: string;
|
||||
};
|
||||
/**
|
||||
* Placed on each role page between the role details and the permissions.
|
||||
* `role` is the role the page is displayed for.
|
||||
*/
|
||||
RoleViewPageBeforePermissions: {
|
||||
role: lib.Role;
|
||||
};
|
||||
};
|
||||
|
||||
export type PluginExtensionSlot = keyof ExtensionSlotProps;
|
||||
|
||||
@@ -295,6 +295,8 @@ export default function RoleViewPage() {
|
||||
<Input value={description} disabled={!canUpdate} onChange={e => setDescription(e.target.value)} />
|
||||
</div>
|
||||
|
||||
<PluginExtra component="RoleViewPageBeforePermissions" role={role} />
|
||||
|
||||
<h3>Permissions</h3>
|
||||
|
||||
<Input.Search placeholder="Search permissions" allowClear
|
||||
|
||||
Reference in new issue
Block a user