{
  "contractName": "PermissioningDynamic",
  "abi": [
    {
      "constant": true,
      "inputs": [
        {
          "name": "",
          "type": "bytes32"
        },
        {
          "name": "",
          "type": "uint256"
        }
      ],
      "name": "permissions",
      "outputs": [
        {
          "name": "",
          "type": "address"
        }
      ],
      "payable": false,
      "stateMutability": "view",
      "type": "function"
    },
    {
      "anonymous": false,
      "inputs": [
        {
          "indexed": false,
          "name": "docID",
          "type": "bytes32"
        }
      ],
      "name": "Permission",
      "type": "event"
    },
    {
      "constant": true,
      "inputs": [
        {
          "name": "document",
          "type": "bytes32"
        }
      ],
      "name": "users",
      "outputs": [
        {
          "name": "",
          "type": "address[]"
        }
      ],
      "payable": false,
      "stateMutability": "view",
      "type": "function"
    },
    {
      "constant": false,
      "inputs": [
        {
          "name": "_docID",
          "type": "bytes32"
        },
        {
          "name": "_users",
          "type": "address[]"
        }
      ],
      "name": "addPermission",
      "outputs": [],
      "payable": false,
      "stateMutability": "nonpayable",
      "type": "function"
    },
    {
      "constant": true,
      "inputs": [
        {
          "name": "user",
          "type": "address"
        },
        {
          "name": "document",
          "type": "bytes32"
        }
      ],
      "name": "checkPermissions",
      "outputs": [
        {
          "name": "",
          "type": "bool"
        }
      ],
      "payable": false,
      "stateMutability": "view",
      "type": "function"
    }
  ],
  "bytecode": "0x608060405234801561001057600080fd5b5061046c806100206000396000f3006080604052600436106100615763ffffffff7c0100000000000000000000000000000000000000000000000000000000600035041663047be4a38114610066578063924e6afb1461009d578063b36a9a7c146100f9578063cea6ab9814610131575b600080fd5b34801561007257600080fd5b50610081600435602435610199565b60408051600160a060020a039092168252519081900360200190f35b3480156100a957600080fd5b506040805160206004602480358281013584810280870186019097528086526100f7968435963696604495919490910192918291850190849080828437509497506101d09650505050505050565b005b34801561010557600080fd5b5061011d600160a060020a03600435166024356102c6565b604080519115158252519081900360200190f35b34801561013d57600080fd5b50610149600435610330565b60408051602080825283518183015283519192839290830191858101910280838360005b8381101561018557818101518382015260200161016d565b505050509050019250505060405180910390f35b6000602052816000526040600020818154811015156101b457fe5b600091825260209091200154600160a060020a03169150829050565b6000828152602081905260409020541561027157604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602260248201527f446f63756d656e74206b657920494420697320616c726561647920696e20757360448201527f652e000000000000000000000000000000000000000000000000000000000000606482015290519081900360840190fd5b600082815260208181526040909120825161028e9284019061039a565b506040805183815290517f1cc9fc44b401f3c62bc063fa96b96115b72c6c810c4cb13745eeb6e173d5ffe59181900360200190a15050565b6000818152602081905260408120815b81548110156103235784600160a060020a031682828154811015156102f757fe5b600091825260209091200154600160a060020a0316141561031b5760019250610328565b6001016102d6565b600092505b505092915050565b6000818152602081815260409182902080548351818402810184019094528084526060939283018282801561038e57602002820191906000526020600020905b8154600160a060020a03168152600190910190602001808311610370575b50505050509050919050565b8280548282559060005260206000209081019282156103fc579160200282015b828111156103fc578251825473ffffffffffffffffffffffffffffffffffffffff1916600160a060020a039091161782556020909201916001909101906103ba565b5061040892915061040c565b5090565b61043d91905b8082111561040857805473ffffffffffffffffffffffffffffffffffffffff19168155600101610412565b905600a165627a7a72305820facf01e5179d12656d4820ae2cb1612d04c09258640118c85b67c61e98f0daf00029",
  "deployedBytecode": "0x6080604052600436106100615763ffffffff7c0100000000000000000000000000000000000000000000000000000000600035041663047be4a38114610066578063924e6afb1461009d578063b36a9a7c146100f9578063cea6ab9814610131575b600080fd5b34801561007257600080fd5b50610081600435602435610199565b60408051600160a060020a039092168252519081900360200190f35b3480156100a957600080fd5b506040805160206004602480358281013584810280870186019097528086526100f7968435963696604495919490910192918291850190849080828437509497506101d09650505050505050565b005b34801561010557600080fd5b5061011d600160a060020a03600435166024356102c6565b604080519115158252519081900360200190f35b34801561013d57600080fd5b50610149600435610330565b60408051602080825283518183015283519192839290830191858101910280838360005b8381101561018557818101518382015260200161016d565b505050509050019250505060405180910390f35b6000602052816000526040600020818154811015156101b457fe5b600091825260209091200154600160a060020a03169150829050565b6000828152602081905260409020541561027157604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602260248201527f446f63756d656e74206b657920494420697320616c726561647920696e20757360448201527f652e000000000000000000000000000000000000000000000000000000000000606482015290519081900360840190fd5b600082815260208181526040909120825161028e9284019061039a565b506040805183815290517f1cc9fc44b401f3c62bc063fa96b96115b72c6c810c4cb13745eeb6e173d5ffe59181900360200190a15050565b6000818152602081905260408120815b81548110156103235784600160a060020a031682828154811015156102f757fe5b600091825260209091200154600160a060020a0316141561031b5760019250610328565b6001016102d6565b600092505b505092915050565b6000818152602081815260409182902080548351818402810184019094528084526060939283018282801561038e57602002820191906000526020600020905b8154600160a060020a03168152600190910190602001808311610370575b50505050509050919050565b8280548282559060005260206000209081019282156103fc579160200282015b828111156103fc578251825473ffffffffffffffffffffffffffffffffffffffff1916600160a060020a039091161782556020909201916001909101906103ba565b5061040892915061040c565b5090565b61043d91905b8082111561040857805473ffffffffffffffffffffffffffffffffffffffff19168155600101610412565b905600a165627a7a72305820facf01e5179d12656d4820ae2cb1612d04c09258640118c85b67c61e98f0daf00029",
  "sourceMap": "157:969:8:-;;;;8:9:-1;5:2;;;30:1;27;20:12;5:2;157:969:8;;;;;;;",
  "deployedSourceMap": "157:969:8:-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;223:48;;8:9:-1;5:2;;;30:1;27;20:12;5:2;-1:-1;223:48:8;;;;;;;;;;;-1:-1:-1;;;;;223:48:8;;;;;;;;;;;;;;490:322;;8:9:-1;5:2;;;30:1;27;20:12;5:2;-1:-1;490:322:8;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;490:322:8;;-1:-1:-1;490:322:8;;-1:-1:-1;;;;;;;490:322:8;;;818:306;;8:9:-1;5:2;;;30:1;27;20:12;5:2;-1:-1;818:306:8;-1:-1:-1;;;;;818:306:8;;;;;;;;;;;;;;;;;;;;;;;;;365:119;;8:9:-1;5:2;;;30:1;27;20:12;5:2;-1:-1;365:119:8;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;8:100:-1;33:3;30:1;27:10;8:100;;;90:11;;;84:18;71:11;;;64:39;52:2;45:10;8:100;;;12:14;365:119:8;;;;;;;;;;;;;;;;;223:48;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;;;223:48:8;;-1:-1:-1;223:48:8;;-1:-1:-1;223:48:8:o;490:322::-;645:11;:19;;;;;;;;;;:26;:31;641:93;;690:44;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;641:93;744:11;:19;;;;;;;;;;;:28;;;;;;;;:::i;:::-;-1:-1:-1;787:18:8;;;;;;;;;;;;;;;;;490:322;;:::o;818:306::-;897:4;943:21;;;;;;;;;;897:4;974:122;995:16;;991:20;;974:122;;;1052:4;-1:-1:-1;;;;;1036:20:8;:9;1046:1;1036:12;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;;;1036:12:8;:20;1032:53;;;1081:4;1074:11;;;;1032:53;1013:3;;974:122;;;1112:5;1105:12;;818:306;;;;;;;:::o;365:119::-;456:11;:21;;;;;;;;;;;;449:28;;;;;;;;;;;;;;;;;421:9;;449:28;;;456:21;449:28;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;;;449:28:8;;;;;;;;;;;;;;;;;;;;;;;365:119;;;:::o;157:969::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;157:969:8;-1:-1:-1;;;;;157:969:8;;;;;;;;;;;-1:-1:-1;157:969:8;;;;;;;-1:-1:-1;157:969:8;;;-1:-1:-1;157:969:8;:::i;:::-;;;:::o;:::-;;;;;;;;;;;;;-1:-1:-1;;157:969:8;;;;;;;;;:::o",
  "source": "pragma solidity ^0.4.24;\n\nimport \"../interfaces/ISecretStorePermissioning.sol\";\n\n\n// Permissioning contract to add an arbitrary number of doc keys and users\ncontract PermissioningDynamic is ISecretStorePermissioning {\n\n    mapping(bytes32 => address[]) public permissions;\n\n    event Permission(bytes32 docID);\n\n    // Utility function to return users of a key\n    function users(bytes32 document) external view returns (address[] memory) {\n        return permissions[document];\n    }\n\n    function addPermission(bytes32 _docID, address[] memory _users) public {\n        // if doc ID is already in use, we do not allow to add/modify\n        if (permissions[_docID].length != 0)\n            revert(\"Document key ID is already in use.\");\n        permissions[_docID] = _users;\n        emit Permission(_docID);\n    }\n\n    function checkPermissions(address user, bytes32 document) public view returns (bool) {\n        address[] storage addresses = permissions[document];\n        for (uint i = 0; i < addresses.length; i++) {\n            if (addresses[i] == user)\n                return true;\n        }\n        return false;\n    }\n}\n",
  "sourcePath": "/home/aznagy/work/secretstore/secretstore-contracts/contracts/simplepermissioning/PermissioningDynamic.sol",
  "ast": {
    "absolutePath": "/home/aznagy/work/secretstore/secretstore-contracts/contracts/simplepermissioning/PermissioningDynamic.sol",
    "exportedSymbols": {
      "PermissioningDynamic": [
        2135
      ]
    },
    "id": 2136,
    "nodeType": "SourceUnit",
    "nodes": [
      {
        "id": 2038,
        "literals": [
          "solidity",
          "^",
          "0.4",
          ".24"
        ],
        "nodeType": "PragmaDirective",
        "src": "0:24:8"
      },
      {
        "absolutePath": "/home/aznagy/work/secretstore/secretstore-contracts/contracts/interfaces/ISecretStorePermissioning.sol",
        "file": "../interfaces/ISecretStorePermissioning.sol",
        "id": 2039,
        "nodeType": "ImportDirective",
        "scope": 2136,
        "sourceUnit": 725,
        "src": "26:53:8",
        "symbolAliases": [],
        "unitAlias": ""
      },
      {
        "baseContracts": [
          {
            "arguments": null,
            "baseName": {
              "contractScope": null,
              "id": 2040,
              "name": "ISecretStorePermissioning",
              "nodeType": "UserDefinedTypeName",
              "referencedDeclaration": 724,
              "src": "190:25:8",
              "typeDescriptions": {
                "typeIdentifier": "t_contract$_ISecretStorePermissioning_$724",
                "typeString": "contract ISecretStorePermissioning"
              }
            },
            "id": 2041,
            "nodeType": "InheritanceSpecifier",
            "src": "190:25:8"
          }
        ],
        "contractDependencies": [
          724
        ],
        "contractKind": "contract",
        "documentation": null,
        "fullyImplemented": true,
        "id": 2135,
        "linearizedBaseContracts": [
          2135,
          724
        ],
        "name": "PermissioningDynamic",
        "nodeType": "ContractDefinition",
        "nodes": [
          {
            "constant": false,
            "id": 2046,
            "name": "permissions",
            "nodeType": "VariableDeclaration",
            "scope": 2135,
            "src": "223:48:8",
            "stateVariable": true,
            "storageLocation": "default",
            "typeDescriptions": {
              "typeIdentifier": "t_mapping$_t_bytes32_$_t_array$_t_address_$dyn_storage_$",
              "typeString": "mapping(bytes32 => address[])"
            },
            "typeName": {
              "id": 2045,
              "keyType": {
                "id": 2042,
                "name": "bytes32",
                "nodeType": "ElementaryTypeName",
                "src": "231:7:8",
                "typeDescriptions": {
                  "typeIdentifier": "t_bytes32",
                  "typeString": "bytes32"
                }
              },
              "nodeType": "Mapping",
              "src": "223:29:8",
              "typeDescriptions": {
                "typeIdentifier": "t_mapping$_t_bytes32_$_t_array$_t_address_$dyn_storage_$",
                "typeString": "mapping(bytes32 => address[])"
              },
              "valueType": {
                "baseType": {
                  "id": 2043,
                  "name": "address",
                  "nodeType": "ElementaryTypeName",
                  "src": "242:7:8",
                  "typeDescriptions": {
                    "typeIdentifier": "t_address",
                    "typeString": "address"
                  }
                },
                "id": 2044,
                "length": null,
                "nodeType": "ArrayTypeName",
                "src": "242:9:8",
                "typeDescriptions": {
                  "typeIdentifier": "t_array$_t_address_$dyn_storage_ptr",
                  "typeString": "address[]"
                }
              }
            },
            "value": null,
            "visibility": "public"
          },
          {
            "anonymous": false,
            "documentation": null,
            "id": 2050,
            "name": "Permission",
            "nodeType": "EventDefinition",
            "parameters": {
              "id": 2049,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 2048,
                  "indexed": false,
                  "name": "docID",
                  "nodeType": "VariableDeclaration",
                  "scope": 2050,
                  "src": "295:13:8",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_bytes32",
                    "typeString": "bytes32"
                  },
                  "typeName": {
                    "id": 2047,
                    "name": "bytes32",
                    "nodeType": "ElementaryTypeName",
                    "src": "295:7:8",
                    "typeDescriptions": {
                      "typeIdentifier": "t_bytes32",
                      "typeString": "bytes32"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                }
              ],
              "src": "294:15:8"
            },
            "src": "278:32:8"
          },
          {
            "body": {
              "id": 2062,
              "nodeType": "Block",
              "src": "439:45:8",
              "statements": [
                {
                  "expression": {
                    "argumentTypes": null,
                    "baseExpression": {
                      "argumentTypes": null,
                      "id": 2058,
                      "name": "permissions",
                      "nodeType": "Identifier",
                      "overloadedDeclarations": [],
                      "referencedDeclaration": 2046,
                      "src": "456:11:8",
                      "typeDescriptions": {
                        "typeIdentifier": "t_mapping$_t_bytes32_$_t_array$_t_address_$dyn_storage_$",
                        "typeString": "mapping(bytes32 => address[] storage ref)"
                      }
                    },
                    "id": 2060,
                    "indexExpression": {
                      "argumentTypes": null,
                      "id": 2059,
                      "name": "document",
                      "nodeType": "Identifier",
                      "overloadedDeclarations": [],
                      "referencedDeclaration": 2052,
                      "src": "468:8:8",
                      "typeDescriptions": {
                        "typeIdentifier": "t_bytes32",
                        "typeString": "bytes32"
                      }
                    },
                    "isConstant": false,
                    "isLValue": true,
                    "isPure": false,
                    "lValueRequested": false,
                    "nodeType": "IndexAccess",
                    "src": "456:21:8",
                    "typeDescriptions": {
                      "typeIdentifier": "t_array$_t_address_$dyn_storage",
                      "typeString": "address[] storage ref"
                    }
                  },
                  "functionReturnParameters": 2057,
                  "id": 2061,
                  "nodeType": "Return",
                  "src": "449:28:8"
                }
              ]
            },
            "documentation": null,
            "id": 2063,
            "implemented": true,
            "isConstructor": false,
            "isDeclaredConst": true,
            "modifiers": [],
            "name": "users",
            "nodeType": "FunctionDefinition",
            "parameters": {
              "id": 2053,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 2052,
                  "name": "document",
                  "nodeType": "VariableDeclaration",
                  "scope": 2063,
                  "src": "380:16:8",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_bytes32",
                    "typeString": "bytes32"
                  },
                  "typeName": {
                    "id": 2051,
                    "name": "bytes32",
                    "nodeType": "ElementaryTypeName",
                    "src": "380:7:8",
                    "typeDescriptions": {
                      "typeIdentifier": "t_bytes32",
                      "typeString": "bytes32"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                }
              ],
              "src": "379:18:8"
            },
            "payable": false,
            "returnParameters": {
              "id": 2057,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 2056,
                  "name": "",
                  "nodeType": "VariableDeclaration",
                  "scope": 2063,
                  "src": "421:9:8",
                  "stateVariable": false,
                  "storageLocation": "memory",
                  "typeDescriptions": {
                    "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr",
                    "typeString": "address[]"
                  },
                  "typeName": {
                    "baseType": {
                      "id": 2054,
                      "name": "address",
                      "nodeType": "ElementaryTypeName",
                      "src": "421:7:8",
                      "typeDescriptions": {
                        "typeIdentifier": "t_address",
                        "typeString": "address"
                      }
                    },
                    "id": 2055,
                    "length": null,
                    "nodeType": "ArrayTypeName",
                    "src": "421:9:8",
                    "typeDescriptions": {
                      "typeIdentifier": "t_array$_t_address_$dyn_storage_ptr",
                      "typeString": "address[]"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                }
              ],
              "src": "420:18:8"
            },
            "scope": 2135,
            "src": "365:119:8",
            "stateMutability": "view",
            "superFunction": null,
            "visibility": "external"
          },
          {
            "body": {
              "id": 2092,
              "nodeType": "Block",
              "src": "561:251:8",
              "statements": [
                {
                  "condition": {
                    "argumentTypes": null,
                    "commonType": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    },
                    "id": 2076,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "lValueRequested": false,
                    "leftExpression": {
                      "argumentTypes": null,
                      "expression": {
                        "argumentTypes": null,
                        "baseExpression": {
                          "argumentTypes": null,
                          "id": 2071,
                          "name": "permissions",
                          "nodeType": "Identifier",
                          "overloadedDeclarations": [],
                          "referencedDeclaration": 2046,
                          "src": "645:11:8",
                          "typeDescriptions": {
                            "typeIdentifier": "t_mapping$_t_bytes32_$_t_array$_t_address_$dyn_storage_$",
                            "typeString": "mapping(bytes32 => address[] storage ref)"
                          }
                        },
                        "id": 2073,
                        "indexExpression": {
                          "argumentTypes": null,
                          "id": 2072,
                          "name": "_docID",
                          "nodeType": "Identifier",
                          "overloadedDeclarations": [],
                          "referencedDeclaration": 2065,
                          "src": "657:6:8",
                          "typeDescriptions": {
                            "typeIdentifier": "t_bytes32",
                            "typeString": "bytes32"
                          }
                        },
                        "isConstant": false,
                        "isLValue": true,
                        "isPure": false,
                        "lValueRequested": false,
                        "nodeType": "IndexAccess",
                        "src": "645:19:8",
                        "typeDescriptions": {
                          "typeIdentifier": "t_array$_t_address_$dyn_storage",
                          "typeString": "address[] storage ref"
                        }
                      },
                      "id": 2074,
                      "isConstant": false,
                      "isLValue": true,
                      "isPure": false,
                      "lValueRequested": false,
                      "memberName": "length",
                      "nodeType": "MemberAccess",
                      "referencedDeclaration": null,
                      "src": "645:26:8",
                      "typeDescriptions": {
                        "typeIdentifier": "t_uint256",
                        "typeString": "uint256"
                      }
                    },
                    "nodeType": "BinaryOperation",
                    "operator": "!=",
                    "rightExpression": {
                      "argumentTypes": null,
                      "hexValue": "30",
                      "id": 2075,
                      "isConstant": false,
                      "isLValue": false,
                      "isPure": true,
                      "kind": "number",
                      "lValueRequested": false,
                      "nodeType": "Literal",
                      "src": "675:1:8",
                      "subdenomination": null,
                      "typeDescriptions": {
                        "typeIdentifier": "t_rational_0_by_1",
                        "typeString": "int_const 0"
                      },
                      "value": "0"
                    },
                    "src": "645:31:8",
                    "typeDescriptions": {
                      "typeIdentifier": "t_bool",
                      "typeString": "bool"
                    }
                  },
                  "falseBody": null,
                  "id": 2081,
                  "nodeType": "IfStatement",
                  "src": "641:93:8",
                  "trueBody": {
                    "expression": {
                      "argumentTypes": null,
                      "arguments": [
                        {
                          "argumentTypes": null,
                          "hexValue": "446f63756d656e74206b657920494420697320616c726561647920696e207573652e",
                          "id": 2078,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": true,
                          "kind": "string",
                          "lValueRequested": false,
                          "nodeType": "Literal",
                          "src": "697:36:8",
                          "subdenomination": null,
                          "typeDescriptions": {
                            "typeIdentifier": "t_stringliteral_37522d61580fa2e6052a2bba5e0f4bb7649386a6d6bdc6d7285b89c18f4802df",
                            "typeString": "literal_string \"Document key ID is already in use.\""
                          },
                          "value": "Document key ID is already in use."
                        }
                      ],
                      "expression": {
                        "argumentTypes": [
                          {
                            "typeIdentifier": "t_stringliteral_37522d61580fa2e6052a2bba5e0f4bb7649386a6d6bdc6d7285b89c18f4802df",
                            "typeString": "literal_string \"Document key ID is already in use.\""
                          }
                        ],
                        "id": 2077,
                        "name": "revert",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [
                          2624,
                          2625
                        ],
                        "referencedDeclaration": 2625,
                        "src": "690:6:8",
                        "typeDescriptions": {
                          "typeIdentifier": "t_function_revert_pure$_t_string_memory_ptr_$returns$__$",
                          "typeString": "function (string memory) pure"
                        }
                      },
                      "id": 2079,
                      "isConstant": false,
                      "isLValue": false,
                      "isPure": false,
                      "kind": "functionCall",
                      "lValueRequested": false,
                      "names": [],
                      "nodeType": "FunctionCall",
                      "src": "690:44:8",
                      "typeDescriptions": {
                        "typeIdentifier": "t_tuple$__$",
                        "typeString": "tuple()"
                      }
                    },
                    "id": 2080,
                    "nodeType": "ExpressionStatement",
                    "src": "690:44:8"
                  }
                },
                {
                  "expression": {
                    "argumentTypes": null,
                    "id": 2086,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "lValueRequested": false,
                    "leftHandSide": {
                      "argumentTypes": null,
                      "baseExpression": {
                        "argumentTypes": null,
                        "id": 2082,
                        "name": "permissions",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 2046,
                        "src": "744:11:8",
                        "typeDescriptions": {
                          "typeIdentifier": "t_mapping$_t_bytes32_$_t_array$_t_address_$dyn_storage_$",
                          "typeString": "mapping(bytes32 => address[] storage ref)"
                        }
                      },
                      "id": 2084,
                      "indexExpression": {
                        "argumentTypes": null,
                        "id": 2083,
                        "name": "_docID",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 2065,
                        "src": "756:6:8",
                        "typeDescriptions": {
                          "typeIdentifier": "t_bytes32",
                          "typeString": "bytes32"
                        }
                      },
                      "isConstant": false,
                      "isLValue": true,
                      "isPure": false,
                      "lValueRequested": true,
                      "nodeType": "IndexAccess",
                      "src": "744:19:8",
                      "typeDescriptions": {
                        "typeIdentifier": "t_array$_t_address_$dyn_storage",
                        "typeString": "address[] storage ref"
                      }
                    },
                    "nodeType": "Assignment",
                    "operator": "=",
                    "rightHandSide": {
                      "argumentTypes": null,
                      "id": 2085,
                      "name": "_users",
                      "nodeType": "Identifier",
                      "overloadedDeclarations": [],
                      "referencedDeclaration": 2068,
                      "src": "766:6:8",
                      "typeDescriptions": {
                        "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr",
                        "typeString": "address[] memory"
                      }
                    },
                    "src": "744:28:8",
                    "typeDescriptions": {
                      "typeIdentifier": "t_array$_t_address_$dyn_storage",
                      "typeString": "address[] storage ref"
                    }
                  },
                  "id": 2087,
                  "nodeType": "ExpressionStatement",
                  "src": "744:28:8"
                },
                {
                  "eventCall": {
                    "argumentTypes": null,
                    "arguments": [
                      {
                        "argumentTypes": null,
                        "id": 2089,
                        "name": "_docID",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 2065,
                        "src": "798:6:8",
                        "typeDescriptions": {
                          "typeIdentifier": "t_bytes32",
                          "typeString": "bytes32"
                        }
                      }
                    ],
                    "expression": {
                      "argumentTypes": [
                        {
                          "typeIdentifier": "t_bytes32",
                          "typeString": "bytes32"
                        }
                      ],
                      "id": 2088,
                      "name": "Permission",
                      "nodeType": "Identifier",
                      "overloadedDeclarations": [],
                      "referencedDeclaration": 2050,
                      "src": "787:10:8",
                      "typeDescriptions": {
                        "typeIdentifier": "t_function_event_nonpayable$_t_bytes32_$returns$__$",
                        "typeString": "function (bytes32)"
                      }
                    },
                    "id": 2090,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "kind": "functionCall",
                    "lValueRequested": false,
                    "names": [],
                    "nodeType": "FunctionCall",
                    "src": "787:18:8",
                    "typeDescriptions": {
                      "typeIdentifier": "t_tuple$__$",
                      "typeString": "tuple()"
                    }
                  },
                  "id": 2091,
                  "nodeType": "EmitStatement",
                  "src": "782:23:8"
                }
              ]
            },
            "documentation": null,
            "id": 2093,
            "implemented": true,
            "isConstructor": false,
            "isDeclaredConst": false,
            "modifiers": [],
            "name": "addPermission",
            "nodeType": "FunctionDefinition",
            "parameters": {
              "id": 2069,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 2065,
                  "name": "_docID",
                  "nodeType": "VariableDeclaration",
                  "scope": 2093,
                  "src": "513:14:8",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_bytes32",
                    "typeString": "bytes32"
                  },
                  "typeName": {
                    "id": 2064,
                    "name": "bytes32",
                    "nodeType": "ElementaryTypeName",
                    "src": "513:7:8",
                    "typeDescriptions": {
                      "typeIdentifier": "t_bytes32",
                      "typeString": "bytes32"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                },
                {
                  "constant": false,
                  "id": 2068,
                  "name": "_users",
                  "nodeType": "VariableDeclaration",
                  "scope": 2093,
                  "src": "529:23:8",
                  "stateVariable": false,
                  "storageLocation": "memory",
                  "typeDescriptions": {
                    "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr",
                    "typeString": "address[]"
                  },
                  "typeName": {
                    "baseType": {
                      "id": 2066,
                      "name": "address",
                      "nodeType": "ElementaryTypeName",
                      "src": "529:7:8",
                      "typeDescriptions": {
                        "typeIdentifier": "t_address",
                        "typeString": "address"
                      }
                    },
                    "id": 2067,
                    "length": null,
                    "nodeType": "ArrayTypeName",
                    "src": "529:9:8",
                    "typeDescriptions": {
                      "typeIdentifier": "t_array$_t_address_$dyn_storage_ptr",
                      "typeString": "address[]"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                }
              ],
              "src": "512:41:8"
            },
            "payable": false,
            "returnParameters": {
              "id": 2070,
              "nodeType": "ParameterList",
              "parameters": [],
              "src": "561:0:8"
            },
            "scope": 2135,
            "src": "490:322:8",
            "stateMutability": "nonpayable",
            "superFunction": null,
            "visibility": "public"
          },
          {
            "body": {
              "id": 2133,
              "nodeType": "Block",
              "src": "903:221:8",
              "statements": [
                {
                  "assignments": [
                    2105
                  ],
                  "declarations": [
                    {
                      "constant": false,
                      "id": 2105,
                      "name": "addresses",
                      "nodeType": "VariableDeclaration",
                      "scope": 2134,
                      "src": "913:27:8",
                      "stateVariable": false,
                      "storageLocation": "storage",
                      "typeDescriptions": {
                        "typeIdentifier": "t_array$_t_address_$dyn_storage_ptr",
                        "typeString": "address[]"
                      },
                      "typeName": {
                        "baseType": {
                          "id": 2103,
                          "name": "address",
                          "nodeType": "ElementaryTypeName",
                          "src": "913:7:8",
                          "typeDescriptions": {
                            "typeIdentifier": "t_address",
                            "typeString": "address"
                          }
                        },
                        "id": 2104,
                        "length": null,
                        "nodeType": "ArrayTypeName",
                        "src": "913:9:8",
                        "typeDescriptions": {
                          "typeIdentifier": "t_array$_t_address_$dyn_storage_ptr",
                          "typeString": "address[]"
                        }
                      },
                      "value": null,
                      "visibility": "internal"
                    }
                  ],
                  "id": 2109,
                  "initialValue": {
                    "argumentTypes": null,
                    "baseExpression": {
                      "argumentTypes": null,
                      "id": 2106,
                      "name": "permissions",
                      "nodeType": "Identifier",
                      "overloadedDeclarations": [],
                      "referencedDeclaration": 2046,
                      "src": "943:11:8",
                      "typeDescriptions": {
                        "typeIdentifier": "t_mapping$_t_bytes32_$_t_array$_t_address_$dyn_storage_$",
                        "typeString": "mapping(bytes32 => address[] storage ref)"
                      }
                    },
                    "id": 2108,
                    "indexExpression": {
                      "argumentTypes": null,
                      "id": 2107,
                      "name": "document",
                      "nodeType": "Identifier",
                      "overloadedDeclarations": [],
                      "referencedDeclaration": 2097,
                      "src": "955:8:8",
                      "typeDescriptions": {
                        "typeIdentifier": "t_bytes32",
                        "typeString": "bytes32"
                      }
                    },
                    "isConstant": false,
                    "isLValue": true,
                    "isPure": false,
                    "lValueRequested": false,
                    "nodeType": "IndexAccess",
                    "src": "943:21:8",
                    "typeDescriptions": {
                      "typeIdentifier": "t_array$_t_address_$dyn_storage",
                      "typeString": "address[] storage ref"
                    }
                  },
                  "nodeType": "VariableDeclarationStatement",
                  "src": "913:51:8"
                },
                {
                  "body": {
                    "id": 2129,
                    "nodeType": "Block",
                    "src": "1018:78:8",
                    "statements": [
                      {
                        "condition": {
                          "argumentTypes": null,
                          "commonType": {
                            "typeIdentifier": "t_address",
                            "typeString": "address"
                          },
                          "id": 2125,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "lValueRequested": false,
                          "leftExpression": {
                            "argumentTypes": null,
                            "baseExpression": {
                              "argumentTypes": null,
                              "id": 2121,
                              "name": "addresses",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 2105,
                              "src": "1036:9:8",
                              "typeDescriptions": {
                                "typeIdentifier": "t_array$_t_address_$dyn_storage_ptr",
                                "typeString": "address[] storage pointer"
                              }
                            },
                            "id": 2123,
                            "indexExpression": {
                              "argumentTypes": null,
                              "id": 2122,
                              "name": "i",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 2111,
                              "src": "1046:1:8",
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            },
                            "isConstant": false,
                            "isLValue": true,
                            "isPure": false,
                            "lValueRequested": false,
                            "nodeType": "IndexAccess",
                            "src": "1036:12:8",
                            "typeDescriptions": {
                              "typeIdentifier": "t_address",
                              "typeString": "address"
                            }
                          },
                          "nodeType": "BinaryOperation",
                          "operator": "==",
                          "rightExpression": {
                            "argumentTypes": null,
                            "id": 2124,
                            "name": "user",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 2095,
                            "src": "1052:4:8",
                            "typeDescriptions": {
                              "typeIdentifier": "t_address",
                              "typeString": "address"
                            }
                          },
                          "src": "1036:20:8",
                          "typeDescriptions": {
                            "typeIdentifier": "t_bool",
                            "typeString": "bool"
                          }
                        },
                        "falseBody": null,
                        "id": 2128,
                        "nodeType": "IfStatement",
                        "src": "1032:53:8",
                        "trueBody": {
                          "expression": {
                            "argumentTypes": null,
                            "hexValue": "74727565",
                            "id": 2126,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": true,
                            "kind": "bool",
                            "lValueRequested": false,
                            "nodeType": "Literal",
                            "src": "1081:4:8",
                            "subdenomination": null,
                            "typeDescriptions": {
                              "typeIdentifier": "t_bool",
                              "typeString": "bool"
                            },
                            "value": "true"
                          },
                          "functionReturnParameters": 2101,
                          "id": 2127,
                          "nodeType": "Return",
                          "src": "1074:11:8"
                        }
                      }
                    ]
                  },
                  "condition": {
                    "argumentTypes": null,
                    "commonType": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    },
                    "id": 2117,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "lValueRequested": false,
                    "leftExpression": {
                      "argumentTypes": null,
                      "id": 2114,
                      "name": "i",
                      "nodeType": "Identifier",
                      "overloadedDeclarations": [],
                      "referencedDeclaration": 2111,
                      "src": "991:1:8",
                      "typeDescriptions": {
                        "typeIdentifier": "t_uint256",
                        "typeString": "uint256"
                      }
                    },
                    "nodeType": "BinaryOperation",
                    "operator": "<",
                    "rightExpression": {
                      "argumentTypes": null,
                      "expression": {
                        "argumentTypes": null,
                        "id": 2115,
                        "name": "addresses",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 2105,
                        "src": "995:9:8",
                        "typeDescriptions": {
                          "typeIdentifier": "t_array$_t_address_$dyn_storage_ptr",
                          "typeString": "address[] storage pointer"
                        }
                      },
                      "id": 2116,
                      "isConstant": false,
                      "isLValue": true,
                      "isPure": false,
                      "lValueRequested": false,
                      "memberName": "length",
                      "nodeType": "MemberAccess",
                      "referencedDeclaration": null,
                      "src": "995:16:8",
                      "typeDescriptions": {
                        "typeIdentifier": "t_uint256",
                        "typeString": "uint256"
                      }
                    },
                    "src": "991:20:8",
                    "typeDescriptions": {
                      "typeIdentifier": "t_bool",
                      "typeString": "bool"
                    }
                  },
                  "id": 2130,
                  "initializationExpression": {
                    "assignments": [
                      2111
                    ],
                    "declarations": [
                      {
                        "constant": false,
                        "id": 2111,
                        "name": "i",
                        "nodeType": "VariableDeclaration",
                        "scope": 2134,
                        "src": "979:6:8",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        },
                        "typeName": {
                          "id": 2110,
                          "name": "uint",
                          "nodeType": "ElementaryTypeName",
                          "src": "979:4:8",
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        },
                        "value": null,
                        "visibility": "internal"
                      }
                    ],
                    "id": 2113,
                    "initialValue": {
                      "argumentTypes": null,
                      "hexValue": "30",
                      "id": 2112,
                      "isConstant": false,
                      "isLValue": false,
                      "isPure": true,
                      "kind": "number",
                      "lValueRequested": false,
                      "nodeType": "Literal",
                      "src": "988:1:8",
                      "subdenomination": null,
                      "typeDescriptions": {
                        "typeIdentifier": "t_rational_0_by_1",
                        "typeString": "int_const 0"
                      },
                      "value": "0"
                    },
                    "nodeType": "VariableDeclarationStatement",
                    "src": "979:10:8"
                  },
                  "loopExpression": {
                    "expression": {
                      "argumentTypes": null,
                      "id": 2119,
                      "isConstant": false,
                      "isLValue": false,
                      "isPure": false,
                      "lValueRequested": false,
                      "nodeType": "UnaryOperation",
                      "operator": "++",
                      "prefix": false,
                      "src": "1013:3:8",
                      "subExpression": {
                        "argumentTypes": null,
                        "id": 2118,
                        "name": "i",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 2111,
                        "src": "1013:1:8",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        }
                      },
                      "typeDescriptions": {
                        "typeIdentifier": "t_uint256",
                        "typeString": "uint256"
                      }
                    },
                    "id": 2120,
                    "nodeType": "ExpressionStatement",
                    "src": "1013:3:8"
                  },
                  "nodeType": "ForStatement",
                  "src": "974:122:8"
                },
                {
                  "expression": {
                    "argumentTypes": null,
                    "hexValue": "66616c7365",
                    "id": 2131,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": true,
                    "kind": "bool",
                    "lValueRequested": false,
                    "nodeType": "Literal",
                    "src": "1112:5:8",
                    "subdenomination": null,
                    "typeDescriptions": {
                      "typeIdentifier": "t_bool",
                      "typeString": "bool"
                    },
                    "value": "false"
                  },
                  "functionReturnParameters": 2101,
                  "id": 2132,
                  "nodeType": "Return",
                  "src": "1105:12:8"
                }
              ]
            },
            "documentation": null,
            "id": 2134,
            "implemented": true,
            "isConstructor": false,
            "isDeclaredConst": true,
            "modifiers": [],
            "name": "checkPermissions",
            "nodeType": "FunctionDefinition",
            "parameters": {
              "id": 2098,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 2095,
                  "name": "user",
                  "nodeType": "VariableDeclaration",
                  "scope": 2134,
                  "src": "844:12:8",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_address",
                    "typeString": "address"
                  },
                  "typeName": {
                    "id": 2094,
                    "name": "address",
                    "nodeType": "ElementaryTypeName",
                    "src": "844:7:8",
                    "typeDescriptions": {
                      "typeIdentifier": "t_address",
                      "typeString": "address"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                },
                {
                  "constant": false,
                  "id": 2097,
                  "name": "document",
                  "nodeType": "VariableDeclaration",
                  "scope": 2134,
                  "src": "858:16:8",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_bytes32",
                    "typeString": "bytes32"
                  },
                  "typeName": {
                    "id": 2096,
                    "name": "bytes32",
                    "nodeType": "ElementaryTypeName",
                    "src": "858:7:8",
                    "typeDescriptions": {
                      "typeIdentifier": "t_bytes32",
                      "typeString": "bytes32"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                }
              ],
              "src": "843:32:8"
            },
            "payable": false,
            "returnParameters": {
              "id": 2101,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 2100,
                  "name": "",
                  "nodeType": "VariableDeclaration",
                  "scope": 2134,
                  "src": "897:4:8",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_bool",
                    "typeString": "bool"
                  },
                  "typeName": {
                    "id": 2099,
                    "name": "bool",
                    "nodeType": "ElementaryTypeName",
                    "src": "897:4:8",
                    "typeDescriptions": {
                      "typeIdentifier": "t_bool",
                      "typeString": "bool"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                }
              ],
              "src": "896:6:8"
            },
            "scope": 2135,
            "src": "818:306:8",
            "stateMutability": "view",
            "superFunction": 723,
            "visibility": "public"
          }
        ],
        "scope": 2136,
        "src": "157:969:8"
      }
    ],
    "src": "0:1127:8"
  },
  "legacyAST": {
    "absolutePath": "/home/aznagy/work/secretstore/secretstore-contracts/contracts/simplepermissioning/PermissioningDynamic.sol",
    "exportedSymbols": {
      "PermissioningDynamic": [
        2135
      ]
    },
    "id": 2136,
    "nodeType": "SourceUnit",
    "nodes": [
      {
        "id": 2038,
        "literals": [
          "solidity",
          "^",
          "0.4",
          ".24"
        ],
        "nodeType": "PragmaDirective",
        "src": "0:24:8"
      },
      {
        "absolutePath": "/home/aznagy/work/secretstore/secretstore-contracts/contracts/interfaces/ISecretStorePermissioning.sol",
        "file": "../interfaces/ISecretStorePermissioning.sol",
        "id": 2039,
        "nodeType": "ImportDirective",
        "scope": 2136,
        "sourceUnit": 725,
        "src": "26:53:8",
        "symbolAliases": [],
        "unitAlias": ""
      },
      {
        "baseContracts": [
          {
            "arguments": null,
            "baseName": {
              "contractScope": null,
              "id": 2040,
              "name": "ISecretStorePermissioning",
              "nodeType": "UserDefinedTypeName",
              "referencedDeclaration": 724,
              "src": "190:25:8",
              "typeDescriptions": {
                "typeIdentifier": "t_contract$_ISecretStorePermissioning_$724",
                "typeString": "contract ISecretStorePermissioning"
              }
            },
            "id": 2041,
            "nodeType": "InheritanceSpecifier",
            "src": "190:25:8"
          }
        ],
        "contractDependencies": [
          724
        ],
        "contractKind": "contract",
        "documentation": null,
        "fullyImplemented": true,
        "id": 2135,
        "linearizedBaseContracts": [
          2135,
          724
        ],
        "name": "PermissioningDynamic",
        "nodeType": "ContractDefinition",
        "nodes": [
          {
            "constant": false,
            "id": 2046,
            "name": "permissions",
            "nodeType": "VariableDeclaration",
            "scope": 2135,
            "src": "223:48:8",
            "stateVariable": true,
            "storageLocation": "default",
            "typeDescriptions": {
              "typeIdentifier": "t_mapping$_t_bytes32_$_t_array$_t_address_$dyn_storage_$",
              "typeString": "mapping(bytes32 => address[])"
            },
            "typeName": {
              "id": 2045,
              "keyType": {
                "id": 2042,
                "name": "bytes32",
                "nodeType": "ElementaryTypeName",
                "src": "231:7:8",
                "typeDescriptions": {
                  "typeIdentifier": "t_bytes32",
                  "typeString": "bytes32"
                }
              },
              "nodeType": "Mapping",
              "src": "223:29:8",
              "typeDescriptions": {
                "typeIdentifier": "t_mapping$_t_bytes32_$_t_array$_t_address_$dyn_storage_$",
                "typeString": "mapping(bytes32 => address[])"
              },
              "valueType": {
                "baseType": {
                  "id": 2043,
                  "name": "address",
                  "nodeType": "ElementaryTypeName",
                  "src": "242:7:8",
                  "typeDescriptions": {
                    "typeIdentifier": "t_address",
                    "typeString": "address"
                  }
                },
                "id": 2044,
                "length": null,
                "nodeType": "ArrayTypeName",
                "src": "242:9:8",
                "typeDescriptions": {
                  "typeIdentifier": "t_array$_t_address_$dyn_storage_ptr",
                  "typeString": "address[]"
                }
              }
            },
            "value": null,
            "visibility": "public"
          },
          {
            "anonymous": false,
            "documentation": null,
            "id": 2050,
            "name": "Permission",
            "nodeType": "EventDefinition",
            "parameters": {
              "id": 2049,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 2048,
                  "indexed": false,
                  "name": "docID",
                  "nodeType": "VariableDeclaration",
                  "scope": 2050,
                  "src": "295:13:8",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_bytes32",
                    "typeString": "bytes32"
                  },
                  "typeName": {
                    "id": 2047,
                    "name": "bytes32",
                    "nodeType": "ElementaryTypeName",
                    "src": "295:7:8",
                    "typeDescriptions": {
                      "typeIdentifier": "t_bytes32",
                      "typeString": "bytes32"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                }
              ],
              "src": "294:15:8"
            },
            "src": "278:32:8"
          },
          {
            "body": {
              "id": 2062,
              "nodeType": "Block",
              "src": "439:45:8",
              "statements": [
                {
                  "expression": {
                    "argumentTypes": null,
                    "baseExpression": {
                      "argumentTypes": null,
                      "id": 2058,
                      "name": "permissions",
                      "nodeType": "Identifier",
                      "overloadedDeclarations": [],
                      "referencedDeclaration": 2046,
                      "src": "456:11:8",
                      "typeDescriptions": {
                        "typeIdentifier": "t_mapping$_t_bytes32_$_t_array$_t_address_$dyn_storage_$",
                        "typeString": "mapping(bytes32 => address[] storage ref)"
                      }
                    },
                    "id": 2060,
                    "indexExpression": {
                      "argumentTypes": null,
                      "id": 2059,
                      "name": "document",
                      "nodeType": "Identifier",
                      "overloadedDeclarations": [],
                      "referencedDeclaration": 2052,
                      "src": "468:8:8",
                      "typeDescriptions": {
                        "typeIdentifier": "t_bytes32",
                        "typeString": "bytes32"
                      }
                    },
                    "isConstant": false,
                    "isLValue": true,
                    "isPure": false,
                    "lValueRequested": false,
                    "nodeType": "IndexAccess",
                    "src": "456:21:8",
                    "typeDescriptions": {
                      "typeIdentifier": "t_array$_t_address_$dyn_storage",
                      "typeString": "address[] storage ref"
                    }
                  },
                  "functionReturnParameters": 2057,
                  "id": 2061,
                  "nodeType": "Return",
                  "src": "449:28:8"
                }
              ]
            },
            "documentation": null,
            "id": 2063,
            "implemented": true,
            "isConstructor": false,
            "isDeclaredConst": true,
            "modifiers": [],
            "name": "users",
            "nodeType": "FunctionDefinition",
            "parameters": {
              "id": 2053,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 2052,
                  "name": "document",
                  "nodeType": "VariableDeclaration",
                  "scope": 2063,
                  "src": "380:16:8",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_bytes32",
                    "typeString": "bytes32"
                  },
                  "typeName": {
                    "id": 2051,
                    "name": "bytes32",
                    "nodeType": "ElementaryTypeName",
                    "src": "380:7:8",
                    "typeDescriptions": {
                      "typeIdentifier": "t_bytes32",
                      "typeString": "bytes32"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                }
              ],
              "src": "379:18:8"
            },
            "payable": false,
            "returnParameters": {
              "id": 2057,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 2056,
                  "name": "",
                  "nodeType": "VariableDeclaration",
                  "scope": 2063,
                  "src": "421:9:8",
                  "stateVariable": false,
                  "storageLocation": "memory",
                  "typeDescriptions": {
                    "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr",
                    "typeString": "address[]"
                  },
                  "typeName": {
                    "baseType": {
                      "id": 2054,
                      "name": "address",
                      "nodeType": "ElementaryTypeName",
                      "src": "421:7:8",
                      "typeDescriptions": {
                        "typeIdentifier": "t_address",
                        "typeString": "address"
                      }
                    },
                    "id": 2055,
                    "length": null,
                    "nodeType": "ArrayTypeName",
                    "src": "421:9:8",
                    "typeDescriptions": {
                      "typeIdentifier": "t_array$_t_address_$dyn_storage_ptr",
                      "typeString": "address[]"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                }
              ],
              "src": "420:18:8"
            },
            "scope": 2135,
            "src": "365:119:8",
            "stateMutability": "view",
            "superFunction": null,
            "visibility": "external"
          },
          {
            "body": {
              "id": 2092,
              "nodeType": "Block",
              "src": "561:251:8",
              "statements": [
                {
                  "condition": {
                    "argumentTypes": null,
                    "commonType": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    },
                    "id": 2076,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "lValueRequested": false,
                    "leftExpression": {
                      "argumentTypes": null,
                      "expression": {
                        "argumentTypes": null,
                        "baseExpression": {
                          "argumentTypes": null,
                          "id": 2071,
                          "name": "permissions",
                          "nodeType": "Identifier",
                          "overloadedDeclarations": [],
                          "referencedDeclaration": 2046,
                          "src": "645:11:8",
                          "typeDescriptions": {
                            "typeIdentifier": "t_mapping$_t_bytes32_$_t_array$_t_address_$dyn_storage_$",
                            "typeString": "mapping(bytes32 => address[] storage ref)"
                          }
                        },
                        "id": 2073,
                        "indexExpression": {
                          "argumentTypes": null,
                          "id": 2072,
                          "name": "_docID",
                          "nodeType": "Identifier",
                          "overloadedDeclarations": [],
                          "referencedDeclaration": 2065,
                          "src": "657:6:8",
                          "typeDescriptions": {
                            "typeIdentifier": "t_bytes32",
                            "typeString": "bytes32"
                          }
                        },
                        "isConstant": false,
                        "isLValue": true,
                        "isPure": false,
                        "lValueRequested": false,
                        "nodeType": "IndexAccess",
                        "src": "645:19:8",
                        "typeDescriptions": {
                          "typeIdentifier": "t_array$_t_address_$dyn_storage",
                          "typeString": "address[] storage ref"
                        }
                      },
                      "id": 2074,
                      "isConstant": false,
                      "isLValue": true,
                      "isPure": false,
                      "lValueRequested": false,
                      "memberName": "length",
                      "nodeType": "MemberAccess",
                      "referencedDeclaration": null,
                      "src": "645:26:8",
                      "typeDescriptions": {
                        "typeIdentifier": "t_uint256",
                        "typeString": "uint256"
                      }
                    },
                    "nodeType": "BinaryOperation",
                    "operator": "!=",
                    "rightExpression": {
                      "argumentTypes": null,
                      "hexValue": "30",
                      "id": 2075,
                      "isConstant": false,
                      "isLValue": false,
                      "isPure": true,
                      "kind": "number",
                      "lValueRequested": false,
                      "nodeType": "Literal",
                      "src": "675:1:8",
                      "subdenomination": null,
                      "typeDescriptions": {
                        "typeIdentifier": "t_rational_0_by_1",
                        "typeString": "int_const 0"
                      },
                      "value": "0"
                    },
                    "src": "645:31:8",
                    "typeDescriptions": {
                      "typeIdentifier": "t_bool",
                      "typeString": "bool"
                    }
                  },
                  "falseBody": null,
                  "id": 2081,
                  "nodeType": "IfStatement",
                  "src": "641:93:8",
                  "trueBody": {
                    "expression": {
                      "argumentTypes": null,
                      "arguments": [
                        {
                          "argumentTypes": null,
                          "hexValue": "446f63756d656e74206b657920494420697320616c726561647920696e207573652e",
                          "id": 2078,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": true,
                          "kind": "string",
                          "lValueRequested": false,
                          "nodeType": "Literal",
                          "src": "697:36:8",
                          "subdenomination": null,
                          "typeDescriptions": {
                            "typeIdentifier": "t_stringliteral_37522d61580fa2e6052a2bba5e0f4bb7649386a6d6bdc6d7285b89c18f4802df",
                            "typeString": "literal_string \"Document key ID is already in use.\""
                          },
                          "value": "Document key ID is already in use."
                        }
                      ],
                      "expression": {
                        "argumentTypes": [
                          {
                            "typeIdentifier": "t_stringliteral_37522d61580fa2e6052a2bba5e0f4bb7649386a6d6bdc6d7285b89c18f4802df",
                            "typeString": "literal_string \"Document key ID is already in use.\""
                          }
                        ],
                        "id": 2077,
                        "name": "revert",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [
                          2624,
                          2625
                        ],
                        "referencedDeclaration": 2625,
                        "src": "690:6:8",
                        "typeDescriptions": {
                          "typeIdentifier": "t_function_revert_pure$_t_string_memory_ptr_$returns$__$",
                          "typeString": "function (string memory) pure"
                        }
                      },
                      "id": 2079,
                      "isConstant": false,
                      "isLValue": false,
                      "isPure": false,
                      "kind": "functionCall",
                      "lValueRequested": false,
                      "names": [],
                      "nodeType": "FunctionCall",
                      "src": "690:44:8",
                      "typeDescriptions": {
                        "typeIdentifier": "t_tuple$__$",
                        "typeString": "tuple()"
                      }
                    },
                    "id": 2080,
                    "nodeType": "ExpressionStatement",
                    "src": "690:44:8"
                  }
                },
                {
                  "expression": {
                    "argumentTypes": null,
                    "id": 2086,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "lValueRequested": false,
                    "leftHandSide": {
                      "argumentTypes": null,
                      "baseExpression": {
                        "argumentTypes": null,
                        "id": 2082,
                        "name": "permissions",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 2046,
                        "src": "744:11:8",
                        "typeDescriptions": {
                          "typeIdentifier": "t_mapping$_t_bytes32_$_t_array$_t_address_$dyn_storage_$",
                          "typeString": "mapping(bytes32 => address[] storage ref)"
                        }
                      },
                      "id": 2084,
                      "indexExpression": {
                        "argumentTypes": null,
                        "id": 2083,
                        "name": "_docID",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 2065,
                        "src": "756:6:8",
                        "typeDescriptions": {
                          "typeIdentifier": "t_bytes32",
                          "typeString": "bytes32"
                        }
                      },
                      "isConstant": false,
                      "isLValue": true,
                      "isPure": false,
                      "lValueRequested": true,
                      "nodeType": "IndexAccess",
                      "src": "744:19:8",
                      "typeDescriptions": {
                        "typeIdentifier": "t_array$_t_address_$dyn_storage",
                        "typeString": "address[] storage ref"
                      }
                    },
                    "nodeType": "Assignment",
                    "operator": "=",
                    "rightHandSide": {
                      "argumentTypes": null,
                      "id": 2085,
                      "name": "_users",
                      "nodeType": "Identifier",
                      "overloadedDeclarations": [],
                      "referencedDeclaration": 2068,
                      "src": "766:6:8",
                      "typeDescriptions": {
                        "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr",
                        "typeString": "address[] memory"
                      }
                    },
                    "src": "744:28:8",
                    "typeDescriptions": {
                      "typeIdentifier": "t_array$_t_address_$dyn_storage",
                      "typeString": "address[] storage ref"
                    }
                  },
                  "id": 2087,
                  "nodeType": "ExpressionStatement",
                  "src": "744:28:8"
                },
                {
                  "eventCall": {
                    "argumentTypes": null,
                    "arguments": [
                      {
                        "argumentTypes": null,
                        "id": 2089,
                        "name": "_docID",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 2065,
                        "src": "798:6:8",
                        "typeDescriptions": {
                          "typeIdentifier": "t_bytes32",
                          "typeString": "bytes32"
                        }
                      }
                    ],
                    "expression": {
                      "argumentTypes": [
                        {
                          "typeIdentifier": "t_bytes32",
                          "typeString": "bytes32"
                        }
                      ],
                      "id": 2088,
                      "name": "Permission",
                      "nodeType": "Identifier",
                      "overloadedDeclarations": [],
                      "referencedDeclaration": 2050,
                      "src": "787:10:8",
                      "typeDescriptions": {
                        "typeIdentifier": "t_function_event_nonpayable$_t_bytes32_$returns$__$",
                        "typeString": "function (bytes32)"
                      }
                    },
                    "id": 2090,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "kind": "functionCall",
                    "lValueRequested": false,
                    "names": [],
                    "nodeType": "FunctionCall",
                    "src": "787:18:8",
                    "typeDescriptions": {
                      "typeIdentifier": "t_tuple$__$",
                      "typeString": "tuple()"
                    }
                  },
                  "id": 2091,
                  "nodeType": "EmitStatement",
                  "src": "782:23:8"
                }
              ]
            },
            "documentation": null,
            "id": 2093,
            "implemented": true,
            "isConstructor": false,
            "isDeclaredConst": false,
            "modifiers": [],
            "name": "addPermission",
            "nodeType": "FunctionDefinition",
            "parameters": {
              "id": 2069,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 2065,
                  "name": "_docID",
                  "nodeType": "VariableDeclaration",
                  "scope": 2093,
                  "src": "513:14:8",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_bytes32",
                    "typeString": "bytes32"
                  },
                  "typeName": {
                    "id": 2064,
                    "name": "bytes32",
                    "nodeType": "ElementaryTypeName",
                    "src": "513:7:8",
                    "typeDescriptions": {
                      "typeIdentifier": "t_bytes32",
                      "typeString": "bytes32"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                },
                {
                  "constant": false,
                  "id": 2068,
                  "name": "_users",
                  "nodeType": "VariableDeclaration",
                  "scope": 2093,
                  "src": "529:23:8",
                  "stateVariable": false,
                  "storageLocation": "memory",
                  "typeDescriptions": {
                    "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr",
                    "typeString": "address[]"
                  },
                  "typeName": {
                    "baseType": {
                      "id": 2066,
                      "name": "address",
                      "nodeType": "ElementaryTypeName",
                      "src": "529:7:8",
                      "typeDescriptions": {
                        "typeIdentifier": "t_address",
                        "typeString": "address"
                      }
                    },
                    "id": 2067,
                    "length": null,
                    "nodeType": "ArrayTypeName",
                    "src": "529:9:8",
                    "typeDescriptions": {
                      "typeIdentifier": "t_array$_t_address_$dyn_storage_ptr",
                      "typeString": "address[]"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                }
              ],
              "src": "512:41:8"
            },
            "payable": false,
            "returnParameters": {
              "id": 2070,
              "nodeType": "ParameterList",
              "parameters": [],
              "src": "561:0:8"
            },
            "scope": 2135,
            "src": "490:322:8",
            "stateMutability": "nonpayable",
            "superFunction": null,
            "visibility": "public"
          },
          {
            "body": {
              "id": 2133,
              "nodeType": "Block",
              "src": "903:221:8",
              "statements": [
                {
                  "assignments": [
                    2105
                  ],
                  "declarations": [
                    {
                      "constant": false,
                      "id": 2105,
                      "name": "addresses",
                      "nodeType": "VariableDeclaration",
                      "scope": 2134,
                      "src": "913:27:8",
                      "stateVariable": false,
                      "storageLocation": "storage",
                      "typeDescriptions": {
                        "typeIdentifier": "t_array$_t_address_$dyn_storage_ptr",
                        "typeString": "address[]"
                      },
                      "typeName": {
                        "baseType": {
                          "id": 2103,
                          "name": "address",
                          "nodeType": "ElementaryTypeName",
                          "src": "913:7:8",
                          "typeDescriptions": {
                            "typeIdentifier": "t_address",
                            "typeString": "address"
                          }
                        },
                        "id": 2104,
                        "length": null,
                        "nodeType": "ArrayTypeName",
                        "src": "913:9:8",
                        "typeDescriptions": {
                          "typeIdentifier": "t_array$_t_address_$dyn_storage_ptr",
                          "typeString": "address[]"
                        }
                      },
                      "value": null,
                      "visibility": "internal"
                    }
                  ],
                  "id": 2109,
                  "initialValue": {
                    "argumentTypes": null,
                    "baseExpression": {
                      "argumentTypes": null,
                      "id": 2106,
                      "name": "permissions",
                      "nodeType": "Identifier",
                      "overloadedDeclarations": [],
                      "referencedDeclaration": 2046,
                      "src": "943:11:8",
                      "typeDescriptions": {
                        "typeIdentifier": "t_mapping$_t_bytes32_$_t_array$_t_address_$dyn_storage_$",
                        "typeString": "mapping(bytes32 => address[] storage ref)"
                      }
                    },
                    "id": 2108,
                    "indexExpression": {
                      "argumentTypes": null,
                      "id": 2107,
                      "name": "document",
                      "nodeType": "Identifier",
                      "overloadedDeclarations": [],
                      "referencedDeclaration": 2097,
                      "src": "955:8:8",
                      "typeDescriptions": {
                        "typeIdentifier": "t_bytes32",
                        "typeString": "bytes32"
                      }
                    },
                    "isConstant": false,
                    "isLValue": true,
                    "isPure": false,
                    "lValueRequested": false,
                    "nodeType": "IndexAccess",
                    "src": "943:21:8",
                    "typeDescriptions": {
                      "typeIdentifier": "t_array$_t_address_$dyn_storage",
                      "typeString": "address[] storage ref"
                    }
                  },
                  "nodeType": "VariableDeclarationStatement",
                  "src": "913:51:8"
                },
                {
                  "body": {
                    "id": 2129,
                    "nodeType": "Block",
                    "src": "1018:78:8",
                    "statements": [
                      {
                        "condition": {
                          "argumentTypes": null,
                          "commonType": {
                            "typeIdentifier": "t_address",
                            "typeString": "address"
                          },
                          "id": 2125,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "lValueRequested": false,
                          "leftExpression": {
                            "argumentTypes": null,
                            "baseExpression": {
                              "argumentTypes": null,
                              "id": 2121,
                              "name": "addresses",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 2105,
                              "src": "1036:9:8",
                              "typeDescriptions": {
                                "typeIdentifier": "t_array$_t_address_$dyn_storage_ptr",
                                "typeString": "address[] storage pointer"
                              }
                            },
                            "id": 2123,
                            "indexExpression": {
                              "argumentTypes": null,
                              "id": 2122,
                              "name": "i",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 2111,
                              "src": "1046:1:8",
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            },
                            "isConstant": false,
                            "isLValue": true,
                            "isPure": false,
                            "lValueRequested": false,
                            "nodeType": "IndexAccess",
                            "src": "1036:12:8",
                            "typeDescriptions": {
                              "typeIdentifier": "t_address",
                              "typeString": "address"
                            }
                          },
                          "nodeType": "BinaryOperation",
                          "operator": "==",
                          "rightExpression": {
                            "argumentTypes": null,
                            "id": 2124,
                            "name": "user",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 2095,
                            "src": "1052:4:8",
                            "typeDescriptions": {
                              "typeIdentifier": "t_address",
                              "typeString": "address"
                            }
                          },
                          "src": "1036:20:8",
                          "typeDescriptions": {
                            "typeIdentifier": "t_bool",
                            "typeString": "bool"
                          }
                        },
                        "falseBody": null,
                        "id": 2128,
                        "nodeType": "IfStatement",
                        "src": "1032:53:8",
                        "trueBody": {
                          "expression": {
                            "argumentTypes": null,
                            "hexValue": "74727565",
                            "id": 2126,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": true,
                            "kind": "bool",
                            "lValueRequested": false,
                            "nodeType": "Literal",
                            "src": "1081:4:8",
                            "subdenomination": null,
                            "typeDescriptions": {
                              "typeIdentifier": "t_bool",
                              "typeString": "bool"
                            },
                            "value": "true"
                          },
                          "functionReturnParameters": 2101,
                          "id": 2127,
                          "nodeType": "Return",
                          "src": "1074:11:8"
                        }
                      }
                    ]
                  },
                  "condition": {
                    "argumentTypes": null,
                    "commonType": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    },
                    "id": 2117,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "lValueRequested": false,
                    "leftExpression": {
                      "argumentTypes": null,
                      "id": 2114,
                      "name": "i",
                      "nodeType": "Identifier",
                      "overloadedDeclarations": [],
                      "referencedDeclaration": 2111,
                      "src": "991:1:8",
                      "typeDescriptions": {
                        "typeIdentifier": "t_uint256",
                        "typeString": "uint256"
                      }
                    },
                    "nodeType": "BinaryOperation",
                    "operator": "<",
                    "rightExpression": {
                      "argumentTypes": null,
                      "expression": {
                        "argumentTypes": null,
                        "id": 2115,
                        "name": "addresses",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 2105,
                        "src": "995:9:8",
                        "typeDescriptions": {
                          "typeIdentifier": "t_array$_t_address_$dyn_storage_ptr",
                          "typeString": "address[] storage pointer"
                        }
                      },
                      "id": 2116,
                      "isConstant": false,
                      "isLValue": true,
                      "isPure": false,
                      "lValueRequested": false,
                      "memberName": "length",
                      "nodeType": "MemberAccess",
                      "referencedDeclaration": null,
                      "src": "995:16:8",
                      "typeDescriptions": {
                        "typeIdentifier": "t_uint256",
                        "typeString": "uint256"
                      }
                    },
                    "src": "991:20:8",
                    "typeDescriptions": {
                      "typeIdentifier": "t_bool",
                      "typeString": "bool"
                    }
                  },
                  "id": 2130,
                  "initializationExpression": {
                    "assignments": [
                      2111
                    ],
                    "declarations": [
                      {
                        "constant": false,
                        "id": 2111,
                        "name": "i",
                        "nodeType": "VariableDeclaration",
                        "scope": 2134,
                        "src": "979:6:8",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        },
                        "typeName": {
                          "id": 2110,
                          "name": "uint",
                          "nodeType": "ElementaryTypeName",
                          "src": "979:4:8",
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        },
                        "value": null,
                        "visibility": "internal"
                      }
                    ],
                    "id": 2113,
                    "initialValue": {
                      "argumentTypes": null,
                      "hexValue": "30",
                      "id": 2112,
                      "isConstant": false,
                      "isLValue": false,
                      "isPure": true,
                      "kind": "number",
                      "lValueRequested": false,
                      "nodeType": "Literal",
                      "src": "988:1:8",
                      "subdenomination": null,
                      "typeDescriptions": {
                        "typeIdentifier": "t_rational_0_by_1",
                        "typeString": "int_const 0"
                      },
                      "value": "0"
                    },
                    "nodeType": "VariableDeclarationStatement",
                    "src": "979:10:8"
                  },
                  "loopExpression": {
                    "expression": {
                      "argumentTypes": null,
                      "id": 2119,
                      "isConstant": false,
                      "isLValue": false,
                      "isPure": false,
                      "lValueRequested": false,
                      "nodeType": "UnaryOperation",
                      "operator": "++",
                      "prefix": false,
                      "src": "1013:3:8",
                      "subExpression": {
                        "argumentTypes": null,
                        "id": 2118,
                        "name": "i",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 2111,
                        "src": "1013:1:8",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        }
                      },
                      "typeDescriptions": {
                        "typeIdentifier": "t_uint256",
                        "typeString": "uint256"
                      }
                    },
                    "id": 2120,
                    "nodeType": "ExpressionStatement",
                    "src": "1013:3:8"
                  },
                  "nodeType": "ForStatement",
                  "src": "974:122:8"
                },
                {
                  "expression": {
                    "argumentTypes": null,
                    "hexValue": "66616c7365",
                    "id": 2131,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": true,
                    "kind": "bool",
                    "lValueRequested": false,
                    "nodeType": "Literal",
                    "src": "1112:5:8",
                    "subdenomination": null,
                    "typeDescriptions": {
                      "typeIdentifier": "t_bool",
                      "typeString": "bool"
                    },
                    "value": "false"
                  },
                  "functionReturnParameters": 2101,
                  "id": 2132,
                  "nodeType": "Return",
                  "src": "1105:12:8"
                }
              ]
            },
            "documentation": null,
            "id": 2134,
            "implemented": true,
            "isConstructor": false,
            "isDeclaredConst": true,
            "modifiers": [],
            "name": "checkPermissions",
            "nodeType": "FunctionDefinition",
            "parameters": {
              "id": 2098,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 2095,
                  "name": "user",
                  "nodeType": "VariableDeclaration",
                  "scope": 2134,
                  "src": "844:12:8",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_address",
                    "typeString": "address"
                  },
                  "typeName": {
                    "id": 2094,
                    "name": "address",
                    "nodeType": "ElementaryTypeName",
                    "src": "844:7:8",
                    "typeDescriptions": {
                      "typeIdentifier": "t_address",
                      "typeString": "address"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                },
                {
                  "constant": false,
                  "id": 2097,
                  "name": "document",
                  "nodeType": "VariableDeclaration",
                  "scope": 2134,
                  "src": "858:16:8",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_bytes32",
                    "typeString": "bytes32"
                  },
                  "typeName": {
                    "id": 2096,
                    "name": "bytes32",
                    "nodeType": "ElementaryTypeName",
                    "src": "858:7:8",
                    "typeDescriptions": {
                      "typeIdentifier": "t_bytes32",
                      "typeString": "bytes32"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                }
              ],
              "src": "843:32:8"
            },
            "payable": false,
            "returnParameters": {
              "id": 2101,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 2100,
                  "name": "",
                  "nodeType": "VariableDeclaration",
                  "scope": 2134,
                  "src": "897:4:8",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_bool",
                    "typeString": "bool"
                  },
                  "typeName": {
                    "id": 2099,
                    "name": "bool",
                    "nodeType": "ElementaryTypeName",
                    "src": "897:4:8",
                    "typeDescriptions": {
                      "typeIdentifier": "t_bool",
                      "typeString": "bool"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                }
              ],
              "src": "896:6:8"
            },
            "scope": 2135,
            "src": "818:306:8",
            "stateMutability": "view",
            "superFunction": 723,
            "visibility": "public"
          }
        ],
        "scope": 2136,
        "src": "157:969:8"
      }
    ],
    "src": "0:1127:8"
  },
  "compiler": {
    "name": "solc",
    "version": "0.4.24+commit.e67f0147.Emscripten.clang"
  },
  "networks": {},
  "schemaVersion": "2.0.1",
  "updatedAt": "2019-01-21T13:35:51.068Z"
}