mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
Team LBAC: Add epilogue to permissions (#82523)
* add epilogue to permissions
* gs
linting fix
* update docs
* Revert "update docs"
This reverts commit 0902ce2d8a
.
This commit is contained in:
parent
d48bf34227
commit
620cc6dced
@ -1,3 +1,4 @@
|
||||
import { hideAppNotification, notifyApp } from '../reducers/appNotification';
|
||||
import { updateNavIndex, updateConfigurationSubtitle } from '../reducers/navModel';
|
||||
|
||||
export { updateNavIndex, updateConfigurationSubtitle, notifyApp, hideAppNotification };
|
||||
|
@ -37,6 +37,7 @@ export type Props = {
|
||||
resourceId: ResourceId;
|
||||
canSetPermissions: boolean;
|
||||
getWarnings?: (items: ResourcePermission[]) => ResourcePermission[];
|
||||
epilogue?: (items: ResourcePermission[]) => React.ReactNode;
|
||||
};
|
||||
|
||||
export const Permissions = ({
|
||||
@ -48,6 +49,7 @@ export const Permissions = ({
|
||||
canSetPermissions,
|
||||
addPermissionTitle,
|
||||
getWarnings,
|
||||
epilogue,
|
||||
}: Props) => {
|
||||
const styles = useStyles2(getStyles);
|
||||
const [isAdding, setIsAdding] = useState(false);
|
||||
@ -157,6 +159,7 @@ export const Permissions = ({
|
||||
const titleTeam = t('access-control.permissions.team', 'Team');
|
||||
|
||||
return (
|
||||
<>
|
||||
<div>
|
||||
{canSetPermissions && resource === 'folders' && (
|
||||
<>
|
||||
@ -238,6 +241,8 @@ export const Permissions = ({
|
||||
</>
|
||||
)}
|
||||
</div>
|
||||
{epilogue && epilogue(items)}
|
||||
</>
|
||||
);
|
||||
};
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user