{"id":19931838,"url":"https://github.com/vincentchalnot/siduseavpermissionbundle","last_synced_at":"2025-07-17T02:39:30.402Z","repository":{"id":57050383,"uuid":"126167886","full_name":"VincentChalnot/SidusEAVPermissionBundle","owner":"VincentChalnot","description":"Integrates attribute-level permissions based on roles for the Sidus/EAVModelBundle","archived":false,"fork":false,"pushed_at":"2019-11-19T09:51:30.000Z","size":13,"stargazers_count":0,"open_issues_count":1,"forks_count":2,"subscribers_count":2,"default_branch":"v1.0-dev","last_synced_at":"2024-08-11T11:05:26.189Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"PHP","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/VincentChalnot.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":"Security/Permission.php","support":null}},"created_at":"2018-03-21T11:21:39.000Z","updated_at":"2018-09-03T13:43:57.000Z","dependencies_parsed_at":"2022-08-24T05:10:35.991Z","dependency_job_id":null,"html_url":"https://github.com/VincentChalnot/SidusEAVPermissionBundle","commit_stats":null,"previous_names":[],"tags_count":6,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/VincentChalnot%2FSidusEAVPermissionBundle","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/VincentChalnot%2FSidusEAVPermissionBundle/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/VincentChalnot%2FSidusEAVPermissionBundle/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/VincentChalnot%2FSidusEAVPermissionBundle/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/VincentChalnot","download_url":"https://codeload.github.com/VincentChalnot/SidusEAVPermissionBundle/tar.gz/refs/heads/v1.0-dev","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":224360236,"owners_count":17298319,"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-12T23:08:15.957Z","updated_at":"2024-11-12T23:08:16.575Z","avatar_url":"https://github.com/VincentChalnot.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"Sidus/EAVPermissionBundle Documentation\n==================================\n\nThis bundle allows you to define role-based permissions for the Sidus/EAVModelBundle.\n\nIt supports permissions on families, attributes and EAVData through their families. (So no entity-level permissions)\n\n## Quick example\n\nRoles are just meant as an example, there is no hard-coded role in this bundle.\n\n````yaml\nsidus_eav_model:\n    families:\n        Post:\n            attributeAsLabel: title\n            options:\n                permissions:\n                    # list: [] # Don't define a permission: means granted for all\n                    edit: [ROLE_DATA_ADMIN]\n                    delete: [] # Defined but left empty: deny access for all\n            attributes:\n                title:\n                    required: true\n\n                content:\n                    type: html\n\n                publicationDate:\n                    type: datetime\n                    options:\n                        permissions:\n                            read: [ROLE_DATA_MANAGER]\n                            edit: [ROLE_DATA_ADMIN]\n````\n\n#### Family permissions\nThere are no rules inside the EAVModelBundle that checks these permissions so it's up to you to check these through\nSymfony's security component:\n````php\n\u003c?php\n\nuse Sidus\\EAVModelBundle\\Model\\FamilyInterface;\nuse Symfony\\Component\\Security\\Core\\Authorization\\AuthorizationCheckerInterface;\nuse Sidus\\EAVPermissionBundle\\Security\\Permission;\n\n/** @var FamilyInterface $family */\n/** @var AuthorizationCheckerInterface $securityChecker **/\n$securityChecker-\u003eisGranted(Permission::EDIT, $family);\n````\n\n|  Note   |\n|:-------:|\n| If you are using the [EAV Manager](https://github.com/cleverage/eav-manager) these permissions are already checked for in datagrids and actions |\n\n#### Attribute permissions\nAttribute permissions are supported natively in the EAVModelBundle through the form component.\n\nIf no permission option is set, it means the attribute will be editable for everyone.\nIf the attribute is readable but not editable, the form type will appear disabled\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvincentchalnot%2Fsiduseavpermissionbundle","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fvincentchalnot%2Fsiduseavpermissionbundle","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvincentchalnot%2Fsiduseavpermissionbundle/lists"}