CanCanCan
wasp
Our great sponsors
CanCanCan | wasp | |
---|---|---|
19 | 192 | |
5,508 | 11,627 | |
0.6% | 16.2% | |
2.2 | 9.7 | |
18 days ago | 2 days ago | |
Ruby | TypeScript | |
MIT License | MIT License |
Stars - the number of stars that a project has on GitHub. Growth - month over month growth in stars.
Activity is a relative number indicating how actively a project is being developed. Recent commits have higher weight than older ones.
For example, an activity of 9.0 indicates that a project is amongst the top 10% of the most actively developed projects that we are tracking.
CanCanCan
-
A guide to Auth & Access Control in web apps 🔐
https://github.com/CanCanCommunity/cancancan (Ruby on Rails ABAC) Same like casl.js, but for Ruby on Rails! Casl.js was actually inspired and modeled by cancancan.
-
Authentication, Roles, and Authorization... oh my.
For authorization, I'm going back and forth with Pundit and CanCanCan
-
Feature flags in Rails: How to roll out and manage your features like a pro
This code mounts the Flipper UI at the /flipper endpoint in your application. The RoleConstraint class is used to restrict access to the UI to users who have the manage role. You can customize this constraint to suit your specific needs. In this case, we're using the CanCanCan gem to gate specific routes to admin users. If you haven't worked with CanCanCan before, ignore the RoleConstraint portion.
-
How would you store roles with up to 64 permissions?
Would you do : 1. a roles table with the name of the role and 64 booleans? 2. A roles table with one JSON field? (using rails json data type) 3. A roles table and a permissions table, similar do what is suggested in the cancancan developpers guide:
-
Protect your GraphQL data with resource_policy
Expressing authorization rules can be a bit challenging with the use of other authorization gems, such as pundit or cancancan. The resource_policy gem provides a more concise and expressive policy definition that uses a simple block-based syntax that makes it easy to understand and write authorization rules for each attribute.
- Top 5 Ruby on Rails Gems
-
Permissions (access control) in web apps
https://github.com/CanCanCommunity/cancancan (Ruby on Rails ABAC) Same like casl.js, but for Ruby on Rails! Casl.js was actually inspired and modeled by cancancan.
-
Web-app security risks demonstrated
In production code you would most likely use a library for access control, such as CanCanCan
-
YAGNI exceptions
PS If you do mobile / web work (or something else with "detached" UI), I find that declarative access control rules are far superior to imperative ones, because they can be serialized and shipped over the wire. For example, backend running cancancan can be easily send the same rules to casl on the frontend, while if you used something like pundit to secure your backend, you either end up re-implementing it in the frontend, or sending ton of "canEdit" flags with every record.
-
Best practice for displaying info to different user roles?
You can use a gem like cancancan (https://github.com/CanCanCommunity/cancancan )to manage authorization, and its helpers to show stuff based on what a user can do
wasp
-
🥇The first framework that lets you visualize your React/NodeJS app 🤯
First off, Wasp is a full-stack React, NodeJS, and Prisma framework with superpowers. It just crossed 10,000 stars on GitHub, and it has been used to create over 50,000 projects.
-
Getting started with Open SaaS
When building AI Blog Articles, I decided to get started as fast as possible. So I looked for a free boilerplate and stumbled upon Open SaaS, which used YC-backed Wasp. It is a full-stack React + NodeJS + Prisma that takes 8 hours to get started with.
-
Ask HN: What's a batteries-included framework that's React-first?
Exactly. Wasp, https://wasp-lang.dev, is the only framework in the React/Node/Prisma space that's taking this opinionated approach to full-stack development.
For example, you get full-stack auth by just adding this to your config file:
`auth.methods: { email: {}, google: {} }`
Then you on-the-fly Auth UI components and all the necessary hooks
-
🕵️♂️ The Art of Self-Learning: How to Teach Yourself Any Programming Concept 🤓
If you already have some sort of foundation in programming, use AI and some great abstractions/frameworks to get things done even faster. For example, instead of creating everything from the ground up (and probably suffering on little things along the way) you can skip repeating yourself a ton of times by using Wasp, which is a great React/Node full-stack framework that takes care of managing the boilerplate side of programming for you. 🤯
-
Aider: AI pair programming in your terminal
Aider is one of my favorite AI agents, especially because it can work with existing codebases. We've seen a lot of good results from folks who used it with Wasp (https://github.com/wasp-lang/wasp) - a full-stack web framework I'm working on.
A "marketingy" demo video: https://www.youtube.com/watch?v=DXunbNBpgZg&ab_channel=Wasp
- Garden – The Design System by Zendesk
-
🎉 Our web framework reached 9,000 stars on GitHub! ⭐️ 9️⃣0️⃣0️⃣0️⃣ ⭐️
Thanks for reading! Find more about Wasp and support us on our journey to reaching 10,000 stars here.
-
Web frameworks we are most excited for in 2024
For those who want the tool to have full control over their stack simply and easily, look no further! Wasp is an opinionated full-stack framework that leverages its compiler for a fast and easy way to create a database, backend, and frontend for your app. It uses React, Node.js, and Prisma, which are some of the most well-known tools that full-stack web developers are using.
-
🐱Product Hunt has become pay-to-win 💰, but you should still use it to launch your product 🚀
Although our main product is Wasp, a full-stack framework on top of React & Node.js, here’s what we launched so far:
- Wasp – Rails-Like Framework for React, Node.js and Prisma
What are some alternatives?
Pundit - Minimal authorization through OO design and pure Ruby classes
reflex - 🕸️ Web apps in pure Python 🐍
rolify - Role management library with resource scoping
redwood - The App Framework for Startups
Action Policy - Authorization framework for Ruby/Rails applications
Mobile-First-RWD - An example of a mobile-first responsive web design
Authority
dhall-lang - Maintainable configuration files
Declarative Authorization - An unmaintained authorization plugin for Rails. Please fork to support current versions of Rails
react-admin - A frontend Framework for building data-driven applications running on top of REST/GraphQL APIs, using TypeScript, React and Material Design
AccessGranted - Multi-role and whitelist based authorization gem for Rails (and not only Rails!)
ansible-dhall-jsonnet