{"id":18365630,"url":"https://github.com/chris-visser/acl","last_synced_at":"2025-04-10T13:28:26.794Z","repository":{"id":206458053,"uuid":"716687670","full_name":"chris-visser/acl","owner":"chris-visser","description":null,"archived":false,"fork":false,"pushed_at":"2023-11-10T18:23:46.000Z","size":459,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-02-15T20:17:00.948Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/chris-visser.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2023-11-09T16:55:12.000Z","updated_at":"2023-11-09T17:02:13.000Z","dependencies_parsed_at":"2023-11-10T04:41:55.769Z","dependency_job_id":"b91619de-5f9a-4338-b9c7-57b8b8ebd906","html_url":"https://github.com/chris-visser/acl","commit_stats":null,"previous_names":["chris-visser/acl"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chris-visser%2Facl","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chris-visser%2Facl/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chris-visser%2Facl/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chris-visser%2Facl/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/chris-visser","download_url":"https://codeload.github.com/chris-visser/acl/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248225672,"owners_count":21068078,"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","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":[],"created_at":"2024-11-05T23:14:09.334Z","updated_at":"2025-04-10T13:28:26.774Z","avatar_url":"https://github.com/chris-visser.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Privileges ACL\n\n**WIP: Do not use this library. I'm updating this to modern standards**\n\nAn access control library to manage and check user privileges. \nThis library has been build to support roles and groups out of the box. \n\nMultiple storage mechanisms are supported or can easily be created. The Mongo \nand Meteor (Minimongo) storage are included by default.\n\n## Getting started\n\n```\nnpm install\n```\n\nJSDocs found at https://chris-acl.netlify.app/\n\n### Selecting a storage\n\n```\nimport Privileges, {MongoStorage, MeteorStorage} from 'privileges';\n\n// Using the mongodb storage\nconst MongoACL = new Privileges(MongoStorage);\n\n// Using the Meteor storage\nconst MeteorACL = new Privileges(MeteorStorage);\n```\n\n### Granting and checking privileges\nSimple checking\n```\nACL.grant('chris', 'read');\n\n// Simple check\nACL.can('chris', 'read'); // Returns true\n\n//Support checking multiple privileges (OR)\nACL.can('chris', ['read', 'write']); // Returns true\n\n// Failure scenario\nACL.can('chris', 'write'); // Returns false\n```\n\nComponent scoped checking\n```\nACL.grant('chris', 'read', 'userList');\n\n// Simple check\nACL.can('chris', 'read', 'userList'); // Returns true\n\n// Fail, because the privilege is scoped to a component\nACL.can('chris', 'read'); // Returns false\n```\n\n\n## Authors\n\n* **Chris Visser** - *Creator* - [Github](https://github.com/Redroest)\n\nSee also the list of [contributors](https://github.com/your/project/contributors) who participated in this project.\n\n## License\n\nThis project is licensed under the MIT License - see the [LICENSE.md](LICENSE.md) file for details\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fchris-visser%2Facl","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fchris-visser%2Facl","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fchris-visser%2Facl/lists"}