Skip to content
Snippets Groups Projects
Select Git revision
  • 2c0b78f9b096f0a44bb142e93b192cf140127675
  • master default protected
  • ACL-Testing
3 results

category.json

Blame
  • user avatar
    Henrique Varella Ehrenfried authored
    6566b819
    History
    category.json 1.08 KiB
    {
      "name": "category",
      "plural": "categories",
      "base": "PersistedModel",
      "idInjection": true,
      "options": {
        "validateUpsert": true
      },
      "properties": {
        "category_name": {
          "type": "string"
        },
        "category_description": {
          "type": "string"
        }
      },
      "validations": [],
      "relations": {
        "locations": {
          "type": "hasMany",
          "model": "geolocation",
          "foreignKey": "category_id"
        },
        "user": {
          "type": "belongsTo",
          "model": "end_user",
          "foreignKey": "id"
        }
      },
      "acls": [
        {
          "accessType": "*",
          "principalType": "ROLE",
          "principalId": "$everyone",
          "permission": "DENY"
        },
        {
          "accessType": "READ",
          "principalType": "ROLE",
          "principalId": "$everyone",
          "permission": "ALLOW"
        },
        {
          "accessType": "*",
          "principalType": "ROLE",
          "principalId": "admin",
          "permission": "ALLOW"
        },
        {
          "accessType": "count",
          "principalType": "ROLE",
          "principalId": "$authenticated",
          "permission": "ALLOW"
        }
      ],
      "methods": {}
    }