coaxsoft / passpartu Goto Github PK
View Code? Open in Web Editor NEWPasspartu makes policies great again
Home Page: https://rubygems.org/gems/passpartu
License: MIT License
Passpartu makes policies great again
Home Page: https://rubygems.org/gems/passpartu
License: MIT License
asd
Add 'only' attribute to method 'can?'
Only accepts string, symbol or array of strings, or symbols
Feature: return false if use role is not listed in 'only' attribute
Example:
user.can?(:orders, :update, only: :manager)
AND
user.can?(:orders, :update, only: [:manager, :agent])
Add configurable feature - waterfall_rules
If policy rule is missed, but the key above value equals true
- positive policy (true)
It must work with any number of keys!
Example
admin:
<<: *manager
post:
create: false
update: true
delete: true
order: true
admin_user.can?(:order, :create) # true
admin_user.can?(:order, :update) # true
admin_user.can?(:order, :whatever) # true
Create cool Github page with basic info from readme
This deprecation is needed in order to migrate to editable policies. Second reason is - waterfall rules does this in a better way!
lib/passpartu.rb:75:in patch_policy_booleans_if': undefined method
transform_values!' for false:FalseClass (NoMethodError)
Add maybe option to true and false.
Maybe means YES if block is NOT passed
Maybe means YES of block is provided AND is true
In case if there are no passpartu.yml
file in config folder - gem crashes, even if new path is configured as Passpartu.configure { |config| config. policy_file = './path/to_policy/file.rb' }
Expected - gem will not crash if ./config/passpartu.yml
does not exist and another policy_file path is configured!
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.