All Projects → brainhubeu → React Permissible

brainhubeu / React Permissible

Licence: mit
👮‍♂️Making the permission management for React components easier.

Programming Languages

javascript
184084 projects - #8 most used programming language
typescript
32286 projects

Projects that are alternatives of or similar to React Permissible

Feathers Vue
A boiler plate template using Feathers with Email Verification, Vue 2 with Server Side Rendering, stylus, scss, jade, babel, webpack, ES 6-8, login form, user authorization, and SEO
Stars: ✭ 195 (+34.48%)
Mutual labels:  webpack, mocha
React Progressive Web App
An opinionated React based repository which is optimized for Progressive Web App development.
Stars: ✭ 548 (+277.93%)
Mutual labels:  webpack, mocha
react-tabllist
React-based customizable style table or list components that support event and callback functions.
Stars: ✭ 20 (-86.21%)
Mutual labels:  props, callback
Breko Hub
Babel React Koa Hot Universal Boilerplate
Stars: ✭ 145 (+0%)
Mutual labels:  webpack, mocha
App Template
Boilerplate for Angular apps
Stars: ✭ 67 (-53.79%)
Mutual labels:  webpack, mocha
Mochapack
Mocha test runner with integrated webpack precompiler
Stars: ✭ 166 (+14.48%)
Mutual labels:  webpack, mocha
React Hot Redux Firebase Starter
🌋 React + Redux + Firebase + Webpack + React Hot Loader 3 + React Router in one boilerplate
Stars: ✭ 375 (+158.62%)
Mutual labels:  webpack, mocha
React Redux Universal Boilerplate
An Universal ReactJS/Redux Boilerplate
Stars: ✭ 165 (+13.79%)
Mutual labels:  webpack, mocha
Interactive Image
A jQuery plugin to embed interactive images on your website.
Stars: ✭ 53 (-63.45%)
Mutual labels:  webpack, mocha
Tvrboreact
Dream starter project: React, Redux, React Router, Webpack
Stars: ✭ 13 (-91.03%)
Mutual labels:  webpack, mocha
Cadence Web
Web UI for visualizing workflows on Cadence
Stars: ✭ 261 (+80%)
Mutual labels:  webpack, mocha
Karma Webpack Example
Karma + Webpack + Mocha + Chai + Istanbul
Stars: ✭ 88 (-39.31%)
Mutual labels:  webpack, mocha
Public
Repository for wallaby.js questions and issues
Stars: ✭ 662 (+356.55%)
Mutual labels:  webpack, mocha
Cookiecutter Webpack
Boilerplate for webpack 2, babel, react + redux + hmr, and karma. Can be inserted into existing django projects.
Stars: ✭ 87 (-40%)
Mutual labels:  webpack, mocha
React Workshop
⚒ 🚧 This is a workshop for learning how to build React Applications
Stars: ✭ 114 (-21.38%)
Mutual labels:  webpack, props
Cracking The Coding Interview Javascript Solutions Ctci
Javascript solutions to Cracking the Coding Interview (CTCI)
Stars: ✭ 139 (-4.14%)
Mutual labels:  mocha
Vue3 Bigdata
一个基于vue3.0的大数据分析系统,包含各种echarts和vue3.0新API
Stars: ✭ 139 (-4.14%)
Mutual labels:  webpack
Jquery Confirm
A multipurpose plugin for alert, confirm & dialog, with extended features.
Stars: ✭ 1,776 (+1124.83%)
Mutual labels:  callback
X0
Document & develop React components without breaking a sweat
Stars: ✭ 1,706 (+1076.55%)
Mutual labels:  webpack
Webpack Require From
Webpack plugin that allows to configure path or URL for fetching dynamic imports
Stars: ✭ 142 (-2.07%)
Mutual labels:  webpack

react-permissible

Making the permission management for React components easier.

Live code demo | Hire us

CircleCI Last commit license PRs Welcome Renovate enabled

Coveralls github Downloads Minified npm Contributors

react-permissible is a React Component allowing to:

  • manage visibility of particular components depending on users permissions
  • replace particular component when the user isn't permitted to see it
  • manage accessability to particular view depending on users permissions
  • fire a callback when the user isn't allowed to go to access the component/route

Why?

Currently there's no permission management in React. The existing components are either over-engineered (full ACL support etc.), or limited to role-based management. react-permissible is simple at its core and solves only one problem. Access the Component if the permissions match, do something otherwise.

Live demo/ docs

You can access live demo/ docs at https://brainhubeu.github.io/react-permissible/.

Installation

npm i @brainhubeu/react-permissible

Usage

import { PermissibleRender } from '@brainhubeu/react-permissible';

...

render() {
  return (
    <PermissibleRender
      userPermissions={permissions}
      requiredPermissions={requiredPermissions}
    >
      <RestrictedComponent/>
    </PermissibleRender>
  );
}

Where:

  • userPermissions is an array of permissions set for current user
  • requiredPermissions is an array of required permissions

More detailed documentation with several use cases covered is available here.

Running tests

npm test

Roadmap

  • Passing a callback function as a prop for PermissibleRender component

License

React-permissible is copyright © 2017-2020 Brainhub It is free software, and may be redistributed under the terms specified in the license.

About

react-permissible is maintained by @kkoscielniak, @adam-golab, @Lukasz-pluszczewski and the Brainhub development team. It is funded by Brainhub and the names and logos for Brainhub are trademarks of Brainhub Sp. z o.o.. You can check other open-source projects supported/developed by our teammates here.

Brainhub

We love open-source JavaScript software! See our other projects or hire us to build your next web, desktop and mobile application with JavaScript.

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].