{"id":16925446,"url":"https://github.com/alejandrodevs/voltex","last_synced_at":"2025-10-06T08:32:30.074Z","repository":{"id":33128004,"uuid":"36767459","full_name":"alejandrodevs/voltex","owner":"alejandrodevs","description":"Dynamic permissions authorization with Rails.","archived":false,"fork":false,"pushed_at":"2023-01-20T06:18:59.000Z","size":111,"stargazers_count":22,"open_issues_count":12,"forks_count":3,"subscribers_count":8,"default_branch":"master","last_synced_at":"2025-08-26T17:45:29.338Z","etag":null,"topics":["authorization","dynamic-permissions","permissions","rails","ruby"],"latest_commit_sha":null,"homepage":"","language":"Ruby","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/alejandrodevs.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2015-06-02T23:18:24.000Z","updated_at":"2025-05-23T00:55:32.000Z","dependencies_parsed_at":"2023-02-12T00:16:46.621Z","dependency_job_id":null,"html_url":"https://github.com/alejandrodevs/voltex","commit_stats":null,"previous_names":[],"tags_count":9,"template":false,"template_full_name":null,"purl":"pkg:github/alejandrodevs/voltex","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alejandrodevs%2Fvoltex","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alejandrodevs%2Fvoltex/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alejandrodevs%2Fvoltex/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alejandrodevs%2Fvoltex/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/alejandrodevs","download_url":"https://codeload.github.com/alejandrodevs/voltex/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alejandrodevs%2Fvoltex/sbom","scorecard":{"id":178954,"data":{"date":"2025-08-11","repo":{"name":"github.com/alejandrodevs/voltex","commit":"e7b07b9877b04291923b2cbcdf7d7be8cc3d6c8d"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":1.7,"checks":[{"name":"Dangerous-Workflow","score":-1,"reason":"no workflows found","details":null,"documentation":{"short":"Determines if the project's GitHub Action workflows avoid dangerous patterns.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#dangerous-workflow"}},{"name":"Packaging","score":-1,"reason":"packaging workflow not detected","details":["Warn: no GitHub/GitLab publishing workflow detected."],"documentation":{"short":"Determines if the project is published as a package that others can easily download, install, easily update, and uninstall.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#packaging"}},{"name":"Maintained","score":0,"reason":"0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#maintained"}},{"name":"Pinned-Dependencies","score":-1,"reason":"no dependencies found","details":null,"documentation":{"short":"Determines if the project has declared and pinned the dependencies of its build process.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#pinned-dependencies"}},{"name":"Binary-Artifacts","score":10,"reason":"no binaries found in the repo","details":null,"documentation":{"short":"Determines if the project has generated executable (binary) artifacts in the source repository.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#binary-artifacts"}},{"name":"Code-Review","score":0,"reason":"Found 0/28 approved changesets -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project requires human code review before pull requests (aka merge requests) are merged.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#code-review"}},{"name":"Token-Permissions","score":-1,"reason":"No tokens found","details":null,"documentation":{"short":"Determines if the project's workflows follow the principle of least privilege.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#token-permissions"}},{"name":"CII-Best-Practices","score":0,"reason":"no effort to earn an OpenSSF best practices badge detected","details":null,"documentation":{"short":"Determines if the project has an OpenSSF (formerly CII) Best Practices Badge.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#cii-best-practices"}},{"name":"Security-Policy","score":0,"reason":"security policy file not detected","details":["Warn: no security policy file detected","Warn: no security file to analyze","Warn: no security file to analyze","Warn: no security file to analyze"],"documentation":{"short":"Determines if the project has published a security policy.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#security-policy"}},{"name":"Fuzzing","score":0,"reason":"project is not fuzzed","details":["Warn: no fuzzer integrations found"],"documentation":{"short":"Determines if the project uses fuzzing.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#fuzzing"}},{"name":"Signed-Releases","score":-1,"reason":"no releases found","details":null,"documentation":{"short":"Determines if the project cryptographically signs release artifacts.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#signed-releases"}},{"name":"License","score":10,"reason":"license file detected","details":["Info: project has a license file: LICENSE.txt:0","Info: FSF or OSI recognized license: MIT License: LICENSE.txt:0"],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#license"}},{"name":"Branch-Protection","score":0,"reason":"branch protection not enabled on development/release branches","details":["Warn: branch protection not enabled for branch 'master'"],"documentation":{"short":"Determines if the default and release branches are protected with GitHub's branch protection settings.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#branch-protection"}},{"name":"SAST","score":0,"reason":"SAST tool is not run on all commits -- score normalized to 0","details":["Warn: 0 commits out of 2 are checked with a SAST tool"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}},{"name":"Vulnerabilities","score":0,"reason":"90 existing vulnerabilities detected","details":["Warn: Project is vulnerable to: GHSA-h47h-mwp9-c6q6","Warn: Project is vulnerable to: GHSA-2rqw-v265-jf8c","Warn: Project is vulnerable to: GHSA-35mm-cc6r-8fjp","Warn: Project is vulnerable to: GHSA-4g8v-vg43-wpgf","Warn: Project is vulnerable to: GHSA-7wjx-3g7j-8584","Warn: Project is vulnerable to: GHSA-8727-m6gj-mc37","Warn: Project is vulnerable to: GHSA-8877-prq4-9xfw","Warn: Project is vulnerable to: GHSA-8xww-x3g3-6jcv","Warn: Project is vulnerable to: GHSA-c6qr-h5vq-59jc","Warn: Project is vulnerable to: GHSA-g8ww-46x2-2p65","Warn: Project is vulnerable to: GHSA-hjg4-8q5f-x6fm","Warn: Project is vulnerable to: GHSA-jp5v-5gx4-jmj9","Warn: Project is vulnerable to: GHSA-mm33-5vfq-3mm3","Warn: Project is vulnerable to: GHSA-p84v-45xj-wwqj","Warn: Project is vulnerable to: GHSA-qphc-hf5q-v8fc","Warn: Project is vulnerable to: GHSA-vfg9-r3fq-jvx4","Warn: Project is vulnerable to: GHSA-vfm5-rmrh-j26v","Warn: Project is vulnerable to: GHSA-wh98-p28r-vrc9","Warn: Project is vulnerable to: GHSA-x76w-6vjr-8xgj","Warn: Project is vulnerable to: GHSA-wwhv-wxv9-rpgw","Warn: Project is vulnerable to: GHSA-65cv-r6x7-79hv","Warn: Project is vulnerable to: GHSA-cfjv-5498-mph5","Warn: Project is vulnerable to: GHSA-ch3h-j2vf-95pv","Warn: Project is vulnerable to: GHSA-xp5h-f8jf-rc8q","Warn: Project is vulnerable to: GHSA-xq5j-gw7f-jgj8","Warn: Project is vulnerable to: GHSA-3hhc-qp5v-9p2j","Warn: Project is vulnerable to: GHSA-579w-22j4-4749","Warn: Project is vulnerable to: GHSA-8hc4-xxm3-5ppp","Warn: Project is vulnerable to: GHSA-hq7p-j377-6v63","Warn: Project is vulnerable to: GHSA-8h22-8cf7-hq6g","Warn: Project is vulnerable to: GHSA-m42x-37p3-fv5w","Warn: Project is vulnerable to: GHSA-w749-p3v6-hccq","Warn: Project is vulnerable to: GHSA-2p68-f74v-9wc6","Warn: Project is vulnerable to: GHSA-cr5q-6q9f-rq6q","Warn: Project is vulnerable to: GHSA-j6gc-792m-qgm2","Warn: Project is vulnerable to: GHSA-pj73-v5mw-pm9j","Warn: Project is vulnerable to: GHSA-23c2-gwp5-pxw9","Warn: Project is vulnerable to: GHSA-228g-948r-83gx","Warn: Project is vulnerable to: GHSA-3x8r-x6xp-q4vm","Warn: Project is vulnerable to: GHSA-486f-hjj9-9vhh","Warn: Project is vulnerable to: GHSA-286v-pcf5-25rc","Warn: Project is vulnerable to: GHSA-2qc6-mcvw-92cw","Warn: Project is vulnerable to: GHSA-2rr5-8q37-2w7h","Warn: Project is vulnerable to: GHSA-353f-x4gh-cqq8","Warn: Project is vulnerable to: GHSA-59gp-qqm7-cw4j","Warn: Project is vulnerable to: GHSA-5w6v-399v-w3cc","Warn: Project is vulnerable to: GHSA-7553-jr98-vx47","Warn: Project is vulnerable to: GHSA-7rrm-v45f-jp64","Warn: Project is vulnerable to: GHSA-cgx6-hpwq-fhv5","Warn: Project is vulnerable to: GHSA-crjr-9rc5-ghw8","Warn: Project is vulnerable to: GHSA-fq42-c5rg-92c2","Warn: Project is vulnerable to: GHSA-gx8x-g87m-h5q6","Warn: Project is vulnerable to: GHSA-jc36-42cf-vqwj","Warn: Project is vulnerable to: GHSA-jw9f-hh49-cvp9","Warn: Project is vulnerable to: GHSA-mrxw-mxhj-p664","Warn: Project is vulnerable to: GHSA-pxvg-2qj5-37jq","Warn: Project is vulnerable to: GHSA-r95h-9x8f-r3f7","Warn: Project is vulnerable to: GHSA-v4f8-2847-rwm7","Warn: Project is vulnerable to: GHSA-v6gp-9mmm-c6p5","Warn: Project is vulnerable to: GHSA-vr8q-g5c7-m54m","Warn: Project is vulnerable to: GHSA-vvfq-8hwr-qm4m","Warn: Project is vulnerable to: GHSA-xc9x-jj77-9p9j","Warn: Project is vulnerable to: GHSA-xh29-r2w5-wx8m","Warn: Project is vulnerable to: GHSA-xxx9-3xcr-gjj3","Warn: Project is vulnerable to: GHSA-22f2-v57c-j9cx","Warn: Project is vulnerable to: GHSA-3h57-hmj3-gj3p","Warn: Project is vulnerable to: GHSA-54rr-7fvw-6x8f","Warn: Project is vulnerable to: GHSA-5f9h-9pjv-v6j7","Warn: Project is vulnerable to: GHSA-65f5-mfpf-vfhj","Warn: Project is vulnerable to: GHSA-7g2v-jj9q-g3rg","Warn: Project is vulnerable to: GHSA-7wqh-767x-r66v","Warn: Project is vulnerable to: GHSA-8cgq-6mh2-7j6v","Warn: Project is vulnerable to: GHSA-93pm-5p5f-3ghx","Warn: Project is vulnerable to: GHSA-c6qg-cjj8-47qp","Warn: Project is vulnerable to: GHSA-gjh7-p2fx-99vx","Warn: Project is vulnerable to: GHSA-hrqr-hxpp-chr3","Warn: Project is vulnerable to: GHSA-hxqx-xwvh-44m2","Warn: Project is vulnerable to: GHSA-j6w9-fv6q-3q52","Warn: Project is vulnerable to: GHSA-rqv2-275x-2jq5","Warn: Project is vulnerable to: GHSA-vpfw-47h7-xj4g","Warn: Project is vulnerable to: GHSA-wq4h-7r42-5hrr","Warn: Project is vulnerable to: GHSA-xj5v-6v4g-jfw6","Warn: Project is vulnerable to: GHSA-5x79-w82f-gw8w","Warn: Project is vulnerable to: GHSA-9h9g-93gc-623h","Warn: Project is vulnerable to: GHSA-mcvf-2q2m-x72m","Warn: Project is vulnerable to: GHSA-pg8v-g4xq-hww9","Warn: Project is vulnerable to: GHSA-rrfc-7g8p-99q8","Warn: Project is vulnerable to: GHSA-mqcp-p2hv-vw6x","Warn: Project is vulnerable to: GHSA-5cm2-9h8c-rvfx","Warn: Project is vulnerable to: GHSA-g6wq-qcwm-j5g2"],"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}}]},"last_synced_at":"2025-08-16T18:25:14.670Z","repository_id":33128004,"created_at":"2025-08-16T18:25:14.670Z","updated_at":"2025-08-16T18:25:14.670Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":278579213,"owners_count":26009967,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-10-06T02:00:05.630Z","response_time":65,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["authorization","dynamic-permissions","permissions","rails","ruby"],"created_at":"2024-10-13T20:10:39.442Z","updated_at":"2025-10-06T08:32:29.733Z","avatar_url":"https://github.com/alejandrodevs.png","language":"Ruby","readme":"# Voltex\nThis engine aims to provide an easy way to work with dynamic permissions.\n\n\n## Installation\n1. Add Voltex to your Gemfile.\n\n```ruby\ngem 'voltex'\n```\n\n2. Generate voltex initializer.\n\n```\nrails g voltex:install\n```\n\n3. Update initializer according your needs.\n\n```ruby\nVoltex.setup do |config|\n  # Voltex classes configuration.\n  # config.user_class = 'User'\n  # config.role_class = 'Role'\n  # config.permission_class = 'Permission'\n  ...\nend\n```\n\n4. Generate voltex resources.\n\n```\nrails g voltex:resources\n```\n\n5. Migrate your database.\n\n```\nrails db:migrate\n```\n\n6. Create default permissions.\n\n```\nrake voltex\n```\n\n7. Load current user permissions in your application controller.\n\n```ruby\nclass ApplicationController \u003c ActionController::Base\n  ...\n  before_action :set_current_permissions\nend\n```\n\nBy default this callback preloads permissions for `current_user` if this\nis defined. If you need that this callback preloads permission for\nanother user just overwrite `voltex_user` method.\n\nExample:\n\n```ruby\nclass ApplicationController \u003c ActionController::Base\n  ...\n  def voltex_user\n    # Default is current_user.\n    another_awesome_user\n  end\nend\n```\n\n\n## Using Voltex with Pundit\nInclude voltex in your application policy.\n\n```ruby\nrequire 'voltex/pundit'\n\nclass ApplicationPolicy\n  include Voltex::Pundit\nend\n```\n\nNow a new helper is available in your policies.\n\n```ruby\nclass PostPolicy\n  def index?\n    permission?(Post, :index)\n  end\nend\n```\n\n\n## Using Voltex with CanCan\nInclude voltex in your ability class.\n\n```ruby\nrequire 'voltex/cancan'\n\nclass Ability\n  include CanCan::Ability\n  include Voltex::CanCan\n\n  def initialize(user)\n    define_voltex_abilities(user)\n  end\nend\n```\n\n\n## Including and Excluding permissions\nUpdate your voltex initializer:\n\n```ruby\nVoltex.setup do |config|\n  # Voltex classes configuration.\n  # config.user_class = 'User'\n  # config.role_class = 'Role'\n  # config.permission_class = 'Permission'\n  #\n  # Excluding default permissions.\n  config.exclude = [\n    { resource: 'Payment', action: 'destroy' },\n    { resource: 'Post', action: 'update' },\n  ]\n  #\n  # Including other permissions.\n  config.include = [\n    { resource: 'User', action: 'enable' },\n    { resource: 'User', action: 'disable' },\n  ]\nend\n```\n\nAnd run voltex rake task again:\n\n```\nrake voltex\n```\n\n\n## Defining role permissions\nMount voltex engine in your application:\n\n```ruby\nRails.application.routes.draw do\n  mount Voltex::Engine =\u003e '/voltex'\nend\n```\n\nRun voltex views generator:\n\n```\nrails g voltex:views\n```\n\nThis will define a route `/voltex/roles/:id/edit` where\npermissions can be defined for each role.\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Falejandrodevs%2Fvoltex","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Falejandrodevs%2Fvoltex","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Falejandrodevs%2Fvoltex/lists"}