{"id":17861193,"url":"https://github.com/jonathanstowe/object-permission","last_synced_at":"2025-04-02T20:47:24.122Z","repository":{"id":66980440,"uuid":"44920733","full_name":"jonathanstowe/Object-Permission","owner":"jonathanstowe","description":"Experimental method (and public attribute accessor,) level authorisation for Raku objects","archived":false,"fork":false,"pushed_at":"2022-08-07T08:43:59.000Z","size":25,"stargazers_count":1,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"master","last_synced_at":"2023-04-22T17:06:59.820Z","etag":null,"topics":["authorization","devel","object","raku"],"latest_commit_sha":null,"homepage":"","language":"Raku","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"artistic-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/jonathanstowe.png","metadata":{"files":{"readme":"README.md","changelog":"Changes","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":"2015-10-25T17:25:48.000Z","updated_at":"2022-08-07T08:44:02.000Z","dependencies_parsed_at":"2023-05-16T10:00:32.077Z","dependency_job_id":null,"html_url":"https://github.com/jonathanstowe/Object-Permission","commit_stats":null,"previous_names":[],"tags_count":7,"template":null,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jonathanstowe%2FObject-Permission","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jonathanstowe%2FObject-Permission/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jonathanstowe%2FObject-Permission/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jonathanstowe%2FObject-Permission/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jonathanstowe","download_url":"https://codeload.github.com/jonathanstowe/Object-Permission/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246892796,"owners_count":20850846,"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":["authorization","devel","object","raku"],"created_at":"2024-10-28T08:43:18.506Z","updated_at":"2025-04-02T20:47:23.833Z","avatar_url":"https://github.com/jonathanstowe.png","language":"Raku","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Object::Permission\n\nExperimental method (and public attribute accessor,) level authorisation for Raku objects.\n\n![Build Status](https://github.com/jonathanstowe/Object-Permission/workflows/CI/badge.svg)\n\n## Synopsis\n\n\tuse Object::Permission;\n\n\tclass Foo {\n\t\thas $.baz is authorised-by('baz');\n\n\t\tmethod bar() is authorised-by('barbar') {\n\t\t\t...\n\t\t}\n\t}\n\t\n\t# Object::Permission::User is a role, just use type pun\n\t$*AUTH-USER = Object::Permission::User.new(permissions =\u003e \u003cbarbar zub\u003e);\n\n\tmy $foo = Foo.new;\n\n\t$foo.bar();   # Executes okay\n\tsay $foo.baz; # Throws X::NotAuthorised\n\n## Description\n\nThis is an experimental module to provide a rudimentary authorisation\nmechanism for classes whereby selected methods or public attribute\naccessors can require a named permission to execute, the permissions\nassociated with the dynamic variable `$*AUTH-USER` being checked\nat invocation and an exception being thrown if the User object does not\nhave the required permission.\n\nThe intent is that `$*AUTH-USER` is initialised with an object\nof some class that does the role `Object::Permission::User` which\npopulates the permissions as per the application logic.\n\n## Installation\n\nAssuming you have a working Rakudo installation you should be able to install this with *zef* :\n\n    # From the source directory\n   \n    zef install .\n\n    # Remote installation\n\n    zef install Object::Permission\n\n\n## Support\n\nSuggestions/patches are welcomed via [github](https://github.com/jonathanstowe/Object-Permission/issues)\n\n## Licence\n\nThis is free software.\n\nPlease see the [LICENCE](LICENCE) file in the distribution\n\n© Jonathan Stowe 2015 - 2021\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjonathanstowe%2Fobject-permission","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjonathanstowe%2Fobject-permission","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjonathanstowe%2Fobject-permission/lists"}