{"id":18882284,"url":"https://github.com/otto-aa/solid-acl-parser","last_synced_at":"2025-10-19T14:59:05.669Z","repository":{"id":35005957,"uuid":"194551449","full_name":"Otto-AA/solid-acl-parser","owner":"Otto-AA","description":"A js library for working with acl files. It allows you to parse the turtle representation, update permissions and agents, and finally convert it back to turtle. It does not cover fetching acl files.","archived":false,"fork":false,"pushed_at":"2023-01-04T21:53:23.000Z","size":3271,"stargazers_count":3,"open_issues_count":22,"forks_count":3,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-03-28T08:41:55.904Z","etag":null,"topics":["acl","acl-library","solid","wac"],"latest_commit_sha":null,"homepage":"https://otto-aa.github.io/solid-acl-parser/","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/Otto-AA.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2019-06-30T19:06:41.000Z","updated_at":"2022-11-15T04:45:38.000Z","dependencies_parsed_at":"2023-01-15T11:52:14.488Z","dependency_job_id":null,"html_url":"https://github.com/Otto-AA/solid-acl-parser","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Otto-AA%2Fsolid-acl-parser","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Otto-AA%2Fsolid-acl-parser/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Otto-AA%2Fsolid-acl-parser/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Otto-AA%2Fsolid-acl-parser/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Otto-AA","download_url":"https://codeload.github.com/Otto-AA/solid-acl-parser/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248955344,"owners_count":21189056,"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":["acl","acl-library","solid","wac"],"created_at":"2024-11-08T06:55:08.450Z","updated_at":"2025-10-19T14:59:00.610Z","avatar_url":"https://github.com/Otto-AA.png","language":"JavaScript","readme":"# Solid ACL Parser [Not actively maintained]\n[![No Maintenance Intended](http://unmaintained.tech/badge.svg)](http://unmaintained.tech/)\n[![Build Status](https://travis-ci.org/Otto-AA/solid-acl-parser.svg?branch=master)](https://travis-ci.org/Otto-AA/solid-acl-parser)\n\nA js library for working with acl files. It allows you to parse the turtle representation, update permissions and agents, and finally convert it back to turtle. *It does not cover fetching acl files.*\n\nIf you don't want to manually fetch and update the acl file, you can take a look at [solid-acl-utils](https://github.com/Otto-AA/solid-acl-utils).\n\n\n# Documentation\nPlease refer to this website for documentation: https://otto-aa.github.io/solid-acl-parser/\n\n\n## Basic example\nThis example demonstrates how to parse a turtle string into an AclDoc object, then modify the permissions for a specific user and finally parse it back to turtle.\n\n```javascript\nconst SolidAclParser = require('SolicAclParser')\n\nconst webId = 'https://pod.example.org/profile/card#me'\nconst aclUrl = 'https://pod.example.org/private/file.ext.acl'\nconst fileUrl = 'https://pod.example.org/private/file.ext'\nconst turtle = `\n@prefix   acl:  \u003chttp://www.w3.org/ns/auth/acl#\u003e.\n@prefix  foaf:  \u003chttp://xmlns.com/foaf/0.1/\u003e.\n\n\u003c#Read-0\u003e\n    a               acl:Authorization;\n    acl:agentClass  foaf:Agent;                               # everyone\n    acl:mode        acl:Read;                                 # has Read-only access\n    acl:accessTo    \u003chttps://pod.example.org/private/file.ext\u003e.`\n\nconst { AclParser, Permissions } = SolidAclParser\nconst { WRITE, CONTROL } = Permissions\n\nasync function main() {\n  // Parse the turtle to an AclDoc object which we can modify\n  const parser = new AclParser({ aclUrl, fileUrl })\n  const doc = await parser.turtleToAclDoc(turtle)\n\n  // Give the webId WRITE and CONTROL permissions\n  doc.addRule([WRITE, CONTROL], webId)\n\n  // Parse it back to turtle so we can store it in the pod\n  const newTurtle = await parser.aclDocToTurtle(doc)\n  console.log(newTurtle)\n}\nmain()\n```\n\nOutput turtle\n```text/turtle\n@prefix acl: \u003chttp://www.w3.org/ns/auth/acl#\u003e.\n@prefix foaf: \u003chttp://xmlns.com/foaf/0.1/\u003e.\n\n\u003c#Read-0\u003e a acl:Authorization;\n    acl:agentClass foaf:Agent;\n    acl:accessTo \u003c./file.ext\u003e;\n    acl:mode acl:Read.\n\u003c#WriteControl-0\u003e a acl:Authorization;\n    acl:agent \u003c/profile/card#me\u003e;\n    acl:accessTo \u003c./file.ext\u003e;\n    acl:mode acl:Write, acl:Control.\n```\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fotto-aa%2Fsolid-acl-parser","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fotto-aa%2Fsolid-acl-parser","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fotto-aa%2Fsolid-acl-parser/lists"}