Giter VIP home page Giter VIP logo

react-permissible's Introduction

Open Source at Brainhub

Brainhub's projects

Open source projects developed by our team:

  • react-permissible - Making the permission management for React components easier.
  • react-carousel - React carousel is a feature-rich, react-way react component that does not suck.

Teammates projects

You can check other open-source projects supported/developed by our teammates:

About

This list is maintained by @adam-golab 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.

react-permissible's People

Contributors

dependabot[bot] avatar elektronik2k5 avatar kjendrzyca avatar kkoscielniak avatar lukasz-pluszczewski avatar marekbrainhub avatar mateusz-brainhub avatar piotr-s-brainhub avatar renovate-bot avatar roberthebel avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

react-permissible's Issues

Missing TypeScript type definitions + repo out of date

Hello and thanks for creating this package!

I intend to use it in a TypeScript project and wrote the missing types. I'd like to contribute them, but it seems like the repo is out of date.
Last commit to this repo is from June 28th, while v1.5.0 was published to npm in September.

The fact that the repo isn't up to date with the published package also reduces credibility - since without diving into published sources, there's no easy way to inspect the source code.

@kkoscielniak @piotr-s-brainhub @adam-golab

docs/demo

Is docs/demo available for react-permissible?
At which URL?

If yes, we should add it to the README and as the repo website.
If no, we should remove @brainhubeu/gatsby-docs-kit.

Default Mask option

Hi,

I wanted to know if you have a option to mask a component instead of hiding it when permissions does not satisfy.

I would need this since I want the user to see the particular component / element / button but cannot do any operation associated to it, and also would like to show an alert that they need to contact admin for required permissions.

In short similar to renderOtherwise is there renderMasked?.

Types error

image

It says can not find module.
I was installed the latest version "@brainhubeu/react-permissible": "^1.9.16", "react": "^17.0.1",
and the node version is 12.13.6.

Permission comparison not working properly

Hi! I was just trying this out and got stuck with an issue.
I think there is something wrong when comparing userPermissions and requiredPermissions, for example in my case:

<PermissibleRender userPermissions={['UnlockLogin', 'aaaa', 'bb']} requiredPermissions={['UnlockLogin', 'aaaa']} > This works properly.

But if you change the order of the userPermissions by putting the not-required permission at the beginning for example
<PermissibleRender userPermissions={[ 'bb', 'UnlockLogin', 'aaaa']} requiredPermissions={['UnlockLogin', 'aaaa']} > now this wont render the component.

I don't think I'm doing anything wrong but maybe you can spot it

Unnecessary devDependencies and examples

The package includes dependencies that are not or shouldn't be used like redux or react-router. Also, the examples folder could be removed. Probably some other files like docker-compose.yml are just noise that affect package size.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.