{"id":20261907,"url":"https://github.com/nodesolidserver/acl-check","last_synced_at":"2025-04-11T01:51:05.690Z","repository":{"id":54201922,"uuid":"147247289","full_name":"nodeSolidServer/acl-check","owner":"nodeSolidServer","description":"Simple check of Web Access Control (WAC) access ","archived":false,"fork":false,"pushed_at":"2024-05-23T15:48:24.000Z","size":782,"stargazers_count":14,"open_issues_count":6,"forks_count":6,"subscribers_count":16,"default_branch":"main","last_synced_at":"2025-03-21T22:38:37.637Z","etag":null,"topics":["running-code"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","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/nodeSolidServer.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.md","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":"2018-09-03T19:52:46.000Z","updated_at":"2024-02-29T02:45:36.000Z","dependencies_parsed_at":"2024-06-19T04:11:03.237Z","dependency_job_id":"255bdb14-3a68-46cd-917c-787a941edfba","html_url":"https://github.com/nodeSolidServer/acl-check","commit_stats":null,"previous_names":["solid/acl-check"],"tags_count":13,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nodeSolidServer%2Facl-check","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nodeSolidServer%2Facl-check/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nodeSolidServer%2Facl-check/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nodeSolidServer%2Facl-check/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/nodeSolidServer","download_url":"https://codeload.github.com/nodeSolidServer/acl-check/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248328104,"owners_count":21085258,"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":["running-code"],"created_at":"2024-11-14T11:27:36.001Z","updated_at":"2025-04-11T01:51:05.667Z","avatar_url":"https://github.com/nodeSolidServer.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# acl-check\n\n[![](https://img.shields.io/badge/project-Solid-7C4DFF.svg?style=flat)](https://github.com/solid/solid)\n[![NPM Version](https://img.shields.io/npm/v/acl-check.svg?style=flat)](https://npm.im/acl-check)\n[![Build Status](https://travis-ci.org/solid/acl-check.svg?branch=master)](https://travis-ci.org/solid/acl-check)\n\nJavascript library for checking [Web Access\nControl](https://github.com/solid/web-access-control-spec) ACLs.\n\n## Usage\n\n```js\nconst $rdf = require('rdflib')\nconst aclCheck = require('acl-check')\nconst ACL = $rdf.Namespace('http://www.w3.org/ns/auth/acl#')\n\nconst kb = $rdf.graph()\nconst fetcher = $rdf.fetcher(kb)\n\nlet doc = $rdf.sym('https://alice.example.com/stuff/myVacation.ttl')\nlet aclDoc = $rdf.sym('https://alice.example.com/stuff/myVacation.ttl.acl')\nlet directory = $rdf.sym('https://alice.example.com/stuff/')\nlet dirAclDoc = $rdf.sym('https://alice.example.com/stuff/')\n\nlet agent = $rdf.sym('https://alice.example.com/card.ttl#me')\nlet modesRequired = [ ACL('Read'), ACL('Write'), ACL('Control') ]\n\nawait fetcher.load(aclDoc) // Load the ACL documents into kb\n\nlet allow = aclCheck.checkAccess(kb, resource, null, aclDoc, agent, modesRequired, origin, trustedOrigins)\n\n// When there is no direct ACL file, find the closest container ACL file in the tree above then...\nawait fetcher.load(dirAclDoc) // Load the directory ACL documents into kb\nlet allow = aclCheck.checkAccess(kb, resource, directory, dirAclDoc, agent, modesRequired, origin, trustedOrigins)\n\nconsole.log('Access allowed? ' + allow)\n// OWTTE\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnodesolidserver%2Facl-check","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnodesolidserver%2Facl-check","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnodesolidserver%2Facl-check/lists"}