All Projects → build-security → react-rbac-ui-manager

build-security / react-rbac-ui-manager

Licence: MIT license
react-rbac-ui-manager is a simple RBAC (Role Based Access Control) user interface library based on the material design system using the Material-UI lib.

Programming Languages

typescript
32286 projects
HTML
75241 projects

Projects that are alternatives of or similar to react-rbac-ui-manager

Gatekeeper
Lightweight library in C# for implementing roles-based access control (RBAC). With Gatekeeper, you can define users, roles, resources, and permissions, and authorize requests.
Stars: ✭ 25 (-65.75%)
Mutual labels:  authorization, rbac, rbac-management, roles-management
rbac-react-redux-aspnetcore
A starter template for creating JWT token from ASP.NET Core API project and applying that JWT token authentication on React application
Stars: ✭ 54 (-26.03%)
Mutual labels:  authorization, rbac, rbac-management
Caddy Authz
Caddy-authz is a middleware for Caddy that blocks or allows requests based on access control policies.
Stars: ✭ 221 (+202.74%)
Mutual labels:  authorization, rbac
Chi Authz
chi-authz is an authorization middleware for Chi
Stars: ✭ 248 (+239.73%)
Mutual labels:  authorization, rbac
tp5-rbac
一个tp5的RBAC库,使用composer来安装和更新你的项目对于RBAC的需求。同时支持jwt方式的验证。包含了RBAC需要的数据表的数据迁移,能够很方便的开始开发。
Stars: ✭ 69 (-5.48%)
Mutual labels:  authorization, rbac
Think Authz
An authorization library that supports access control models like ACL, RBAC, ABAC in ThinkPHP 6.0 .
Stars: ✭ 155 (+112.33%)
Mutual labels:  authorization, rbac
Casbin Server
Casbin as a Service (CaaS)
Stars: ✭ 171 (+134.25%)
Mutual labels:  authorization, rbac
Rbac
Hierarchical Role-Based Access Control for Node.js
Stars: ✭ 254 (+247.95%)
Mutual labels:  authorization, rbac
Caddy Auth Jwt
JWT Authorization Plugin for Caddy v2
Stars: ✭ 127 (+73.97%)
Mutual labels:  authorization, rbac
deflek
index and API RBAC for Elasticsearch and Kibana via reverse proxy. DEPRECATED
Stars: ✭ 13 (-82.19%)
Mutual labels:  authorization, rbac
rbac-tool
Rapid7 | insightCloudSec | Kubernetes RBAC Power Toys - Visualize, Analyze, Generate & Query
Stars: ✭ 546 (+647.95%)
Mutual labels:  authorization, rbac
lua-casbin
An authorization library that supports access control models like ACL, RBAC, ABAC in Lua (OpenResty)
Stars: ✭ 43 (-41.1%)
Mutual labels:  authorization, rbac
Speedle
Speedle is an open source project for access control.
Stars: ✭ 153 (+109.59%)
Mutual labels:  authorization, rbac
Negroni Authz
negroni-authz is an authorization middleware for Negroni
Stars: ✭ 152 (+108.22%)
Mutual labels:  authorization, rbac
Casbin Authz Plugin
Docker Authorization Plugin based on Casbin
Stars: ✭ 204 (+179.45%)
Mutual labels:  authorization, rbac
Laratrust
Handle roles and permissions in your Laravel application
Stars: ✭ 1,799 (+2364.38%)
Mutual labels:  authorization, rbac
Yii2 Usuario
Highly customizable and extensible user management, authentication, and authorization Yii2 extension
Stars: ✭ 251 (+243.84%)
Mutual labels:  authorization, rbac
Rbac.dev
A collection of good practices and tools for Kubernetes RBAC
Stars: ✭ 115 (+57.53%)
Mutual labels:  authorization, rbac
Accesscontrol
Role and Attribute based Access Control for Node.js
Stars: ✭ 1,723 (+2260.27%)
Mutual labels:  authorization, rbac
EasyShiro
基于 RBAC 模型功能全面的 Shiro 安全集成&简化&扩展组件。Shiro integration & simplifies & Extension component based RBAC
Stars: ✭ 47 (-35.62%)
Mutual labels:  rbac, rbac-management

React RBAC UI Manager - User Guide

react-rbac-ui-manager is a simple RBAC (Role Based Access Control) user interface library based on the material design system using the Material-UI lib.

license npm latest package npm bundle size GitHub Workflow Status

This lib generates a simple json output of the roles and permissions and can be used internally with any react with material-ui based application.

react rbac ui manager - live demo

Table of contents

Install

npm install @build-security/react-rbac-ui-manager --save

If your project doesn't already use them, you need to install @material-ui/core, @material-ui/icons and @material-ui/lab as well.

Demo

Check the live working example on codesandbox:
Edit react-rbac-ui-sample

Usage

Simple usage:

import Rbac from "@build-security/react-rbac-ui-manager";
import { PermissionsObject } from "@build-security/react-rbac-ui-manager/dist/types";

const handleChange = (value: PermissionsObject) => {
    console.log(value)
};

<Rbac
    onChange={handleChange}
/>

Customized icons:

import Rbac from "@build-security/react-rbac-ui-manager";
import { PermissionsObject } from "@build-security/react-rbac-ui-manager/dist/types";
import DeleteIcon from '@material-ui/icons/Delete';
import styled from "styled-components";

const handleChange = (value: PermissionsObject) => {
    console.log(value)
 };

const deleteIcon = styled(DeleteIcon)`
    background: red;
    color: black;

    &.MuiSvgIcon-colorError {
        color: black;
    }
`;
 
<Rbac
    icons={{
        deleteIcon: deleteIcon
    }}
    onChange={handleChange}
/>

👉 Note - the JSON Viewer is not part of this lib.
The live example (in codesandbox) contains a working version with external viewer

API

<Rbac />

The Rbac component accepts the following props (none of which is required):

Name Type Description
defaultValue object JSON structure, same as the one that is generated by the lib
onChange function Callback fired on every change.
signature:
function(data: object) => void
data: The JSON object with the new value.
resourceForbiddenCharsRegex RegExp Regular expression to remove invalid characters from the resource
buttons object Object contains buttons to be used as replacement for the default buttons (see below)
icons object Object contains icons to be used as replacement for the default icons (see below)
components object Object contains components to be used as replacement for the default components (see below)

The Buttons object:

Name Type Description
cancelButton node The component to use for the cancel button inside the modal
closeButton node The component to use for the close button inside the modal
deleteButton node The component to use for the delete button inside the modal
saveButton node The component to use for the save button inside the modal

The Icons object:

Name Type Description
deleteIcon node The component to use for the delete icon in the roles column
editIcon node The component to use for the edit icon in the roles column
treeAddIcon node The component to use for the add icon in the tree
treeCollapseIcon node The component to use for the collapse icon in the tree
treeDeleteIcon node The component to use for the delete icon in the tree
treeExpandIcon node The component to use for the expand icon in the tree
treeEditIcon node The component to use for the edit icon in the tree
treeNodeIcon node The component to use for the non-expandable node in the tree
treeParentIcon node The component to use for the expandable node in the tree

The Components object:

Name Type Description
addResource node The component to use for the Add Resource block
addRole node The component to use for the Add Role block
checkboxTableContainer node The component to use for the container of the checkbox table
roleTag node The component to use for the role name tag

License

Licensed under the MIT License, Copyright © 2021-present Dekel Braunstein.

See LICENSE for more information.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].