|
@@ -15,49 +15,39 @@
|
|
|
}
|
|
|
]
|
|
|
},
|
|
|
- "set": {
|
|
|
- "description": "A list of permissions sets defined",
|
|
|
+ "permission": {
|
|
|
+ "description": "A list of inlined permissions",
|
|
|
"default": [],
|
|
|
"type": "array",
|
|
|
"items": {
|
|
|
- "$ref": "#/definitions/PermissionSet"
|
|
|
+ "$ref": "#/definitions/Permission"
|
|
|
}
|
|
|
},
|
|
|
- "permission": {
|
|
|
- "description": "A list of inlined permissions",
|
|
|
+ "set": {
|
|
|
+ "description": "A list of permissions sets defined",
|
|
|
"default": [],
|
|
|
"type": "array",
|
|
|
"items": {
|
|
|
- "$ref": "#/definitions/Permission"
|
|
|
+ "$ref": "#/definitions/PermissionSet"
|
|
|
}
|
|
|
}
|
|
|
},
|
|
|
"definitions": {
|
|
|
- "DefaultPermission": {
|
|
|
- "description": "The default permission set of the plugin.\n\nWorks similarly to a permission with the \"default\" identifier.",
|
|
|
+ "Commands": {
|
|
|
+ "description": "Allowed and denied commands inside a permission.\n\nIf two commands clash inside of `allow` and `deny`, it should be denied by default.",
|
|
|
"type": "object",
|
|
|
- "required": [
|
|
|
- "permissions"
|
|
|
- ],
|
|
|
"properties": {
|
|
|
- "version": {
|
|
|
- "description": "The version of the permission.",
|
|
|
- "type": [
|
|
|
- "integer",
|
|
|
- "null"
|
|
|
- ],
|
|
|
- "format": "uint64",
|
|
|
- "minimum": 1.0
|
|
|
- },
|
|
|
- "description": {
|
|
|
- "description": "Human-readable description of what the permission does.",
|
|
|
- "type": [
|
|
|
- "string",
|
|
|
- "null"
|
|
|
- ]
|
|
|
+ "allow": {
|
|
|
+ "description": "Allowed command.",
|
|
|
+ "default": [],
|
|
|
+ "type": "array",
|
|
|
+ "items": {
|
|
|
+ "type": "string"
|
|
|
+ }
|
|
|
},
|
|
|
- "permissions": {
|
|
|
- "description": "All permissions this set contains.",
|
|
|
+ "deny": {
|
|
|
+ "description": "Denied command, which takes priority.",
|
|
|
+ "default": [],
|
|
|
"type": "array",
|
|
|
"items": {
|
|
|
"type": "string"
|
|
@@ -65,32 +55,53 @@
|
|
|
}
|
|
|
}
|
|
|
},
|
|
|
- "PermissionSet": {
|
|
|
- "description": "A set of direct permissions grouped together under a new name.",
|
|
|
+ "DefaultPermission": {
|
|
|
+ "description": "The default permission set of the plugin.\n\nWorks similarly to a permission with the \"default\" identifier.",
|
|
|
"type": "object",
|
|
|
"required": [
|
|
|
- "description",
|
|
|
- "identifier",
|
|
|
"permissions"
|
|
|
],
|
|
|
"properties": {
|
|
|
- "identifier": {
|
|
|
- "description": "A unique identifier for the permission.",
|
|
|
- "type": "string"
|
|
|
- },
|
|
|
"description": {
|
|
|
"description": "Human-readable description of what the permission does.",
|
|
|
- "type": "string"
|
|
|
+ "type": [
|
|
|
+ "string",
|
|
|
+ "null"
|
|
|
+ ]
|
|
|
},
|
|
|
"permissions": {
|
|
|
"description": "All permissions this set contains.",
|
|
|
"type": "array",
|
|
|
"items": {
|
|
|
- "$ref": "#/definitions/PermissionKind"
|
|
|
+ "type": "string"
|
|
|
}
|
|
|
+ },
|
|
|
+ "version": {
|
|
|
+ "description": "The version of the permission.",
|
|
|
+ "type": [
|
|
|
+ "integer",
|
|
|
+ "null"
|
|
|
+ ],
|
|
|
+ "format": "uint64",
|
|
|
+ "minimum": 1.0
|
|
|
}
|
|
|
}
|
|
|
},
|
|
|
+ "Number": {
|
|
|
+ "description": "A valid ACL number.",
|
|
|
+ "anyOf": [
|
|
|
+ {
|
|
|
+ "description": "Represents an [`i64`].",
|
|
|
+ "type": "integer",
|
|
|
+ "format": "int64"
|
|
|
+ },
|
|
|
+ {
|
|
|
+ "description": "Represents a [`f64`].",
|
|
|
+ "type": "number",
|
|
|
+ "format": "double"
|
|
|
+ }
|
|
|
+ ]
|
|
|
+ },
|
|
|
"Permission": {
|
|
|
"description": "Descriptions of explicit privileges of commands.\n\nIt can enable commands to be accessible in the frontend of the application.\n\nIf the scope is defined it can be used to fine grain control the access of individual or multiple commands.",
|
|
|
"type": "object",
|
|
@@ -98,26 +109,6 @@
|
|
|
"identifier"
|
|
|
],
|
|
|
"properties": {
|
|
|
- "version": {
|
|
|
- "description": "The version of the permission.",
|
|
|
- "type": [
|
|
|
- "integer",
|
|
|
- "null"
|
|
|
- ],
|
|
|
- "format": "uint64",
|
|
|
- "minimum": 1.0
|
|
|
- },
|
|
|
- "identifier": {
|
|
|
- "description": "A unique identifier for the permission.",
|
|
|
- "type": "string"
|
|
|
- },
|
|
|
- "description": {
|
|
|
- "description": "Human-readable description of what the permission does.",
|
|
|
- "type": [
|
|
|
- "string",
|
|
|
- "null"
|
|
|
- ]
|
|
|
- },
|
|
|
"commands": {
|
|
|
"description": "Allowed or denied commands when using this permission.",
|
|
|
"default": {
|
|
@@ -130,6 +121,17 @@
|
|
|
}
|
|
|
]
|
|
|
},
|
|
|
+ "description": {
|
|
|
+ "description": "Human-readable description of what the permission does.",
|
|
|
+ "type": [
|
|
|
+ "string",
|
|
|
+ "null"
|
|
|
+ ]
|
|
|
+ },
|
|
|
+ "identifier": {
|
|
|
+ "description": "A unique identifier for the permission.",
|
|
|
+ "type": "string"
|
|
|
+ },
|
|
|
"scope": {
|
|
|
"description": "Allowed or denied scoped when using this permission.",
|
|
|
"default": {},
|
|
@@ -138,111 +140,18 @@
|
|
|
"$ref": "#/definitions/Scopes"
|
|
|
}
|
|
|
]
|
|
|
- }
|
|
|
- }
|
|
|
- },
|
|
|
- "Commands": {
|
|
|
- "description": "Allowed and denied commands inside a permission.\n\nIf two commands clash inside of `allow` and `deny`, it should be denied by default.",
|
|
|
- "type": "object",
|
|
|
- "properties": {
|
|
|
- "allow": {
|
|
|
- "description": "Allowed command.",
|
|
|
- "default": [],
|
|
|
- "type": "array",
|
|
|
- "items": {
|
|
|
- "type": "string"
|
|
|
- }
|
|
|
- },
|
|
|
- "deny": {
|
|
|
- "description": "Denied command, which takes priority.",
|
|
|
- "default": [],
|
|
|
- "type": "array",
|
|
|
- "items": {
|
|
|
- "type": "string"
|
|
|
- }
|
|
|
- }
|
|
|
- }
|
|
|
- },
|
|
|
- "Scopes": {
|
|
|
- "description": "A restriction of the command/endpoint functionality.\n\nIt can be of any serde serializable type and is used for allowing or preventing certain actions inside a Tauri command.\n\nThe scope is passed to the command and handled/enforced by the command itself.",
|
|
|
- "type": "object",
|
|
|
- "properties": {
|
|
|
- "allow": {
|
|
|
- "description": "Data that defines what is allowed by the scope.",
|
|
|
- "type": [
|
|
|
- "array",
|
|
|
- "null"
|
|
|
- ],
|
|
|
- "items": {
|
|
|
- "$ref": "#/definitions/Value"
|
|
|
- }
|
|
|
},
|
|
|
- "deny": {
|
|
|
- "description": "Data that defines what is denied by the scope.",
|
|
|
+ "version": {
|
|
|
+ "description": "The version of the permission.",
|
|
|
"type": [
|
|
|
- "array",
|
|
|
+ "integer",
|
|
|
"null"
|
|
|
],
|
|
|
- "items": {
|
|
|
- "$ref": "#/definitions/Value"
|
|
|
- }
|
|
|
+ "format": "uint64",
|
|
|
+ "minimum": 1.0
|
|
|
}
|
|
|
}
|
|
|
},
|
|
|
- "Value": {
|
|
|
- "description": "All supported ACL values.",
|
|
|
- "anyOf": [
|
|
|
- {
|
|
|
- "description": "Represents a null JSON value.",
|
|
|
- "type": "null"
|
|
|
- },
|
|
|
- {
|
|
|
- "description": "Represents a [`bool`].",
|
|
|
- "type": "boolean"
|
|
|
- },
|
|
|
- {
|
|
|
- "description": "Represents a valid ACL [`Number`].",
|
|
|
- "allOf": [
|
|
|
- {
|
|
|
- "$ref": "#/definitions/Number"
|
|
|
- }
|
|
|
- ]
|
|
|
- },
|
|
|
- {
|
|
|
- "description": "Represents a [`String`].",
|
|
|
- "type": "string"
|
|
|
- },
|
|
|
- {
|
|
|
- "description": "Represents a list of other [`Value`]s.",
|
|
|
- "type": "array",
|
|
|
- "items": {
|
|
|
- "$ref": "#/definitions/Value"
|
|
|
- }
|
|
|
- },
|
|
|
- {
|
|
|
- "description": "Represents a map of [`String`] keys to [`Value`]s.",
|
|
|
- "type": "object",
|
|
|
- "additionalProperties": {
|
|
|
- "$ref": "#/definitions/Value"
|
|
|
- }
|
|
|
- }
|
|
|
- ]
|
|
|
- },
|
|
|
- "Number": {
|
|
|
- "description": "A valid ACL number.",
|
|
|
- "anyOf": [
|
|
|
- {
|
|
|
- "description": "Represents an [`i64`].",
|
|
|
- "type": "integer",
|
|
|
- "format": "int64"
|
|
|
- },
|
|
|
- {
|
|
|
- "description": "Represents a [`f64`].",
|
|
|
- "type": "number",
|
|
|
- "format": "double"
|
|
|
- }
|
|
|
- ]
|
|
|
- },
|
|
|
"PermissionKind": {
|
|
|
"type": "string",
|
|
|
"oneOf": [
|
|
@@ -324,6 +233,97 @@
|
|
|
]
|
|
|
}
|
|
|
]
|
|
|
+ },
|
|
|
+ "PermissionSet": {
|
|
|
+ "description": "A set of direct permissions grouped together under a new name.",
|
|
|
+ "type": "object",
|
|
|
+ "required": [
|
|
|
+ "description",
|
|
|
+ "identifier",
|
|
|
+ "permissions"
|
|
|
+ ],
|
|
|
+ "properties": {
|
|
|
+ "description": {
|
|
|
+ "description": "Human-readable description of what the permission does.",
|
|
|
+ "type": "string"
|
|
|
+ },
|
|
|
+ "identifier": {
|
|
|
+ "description": "A unique identifier for the permission.",
|
|
|
+ "type": "string"
|
|
|
+ },
|
|
|
+ "permissions": {
|
|
|
+ "description": "All permissions this set contains.",
|
|
|
+ "type": "array",
|
|
|
+ "items": {
|
|
|
+ "$ref": "#/definitions/PermissionKind"
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ },
|
|
|
+ "Scopes": {
|
|
|
+ "description": "A restriction of the command/endpoint functionality.\n\nIt can be of any serde serializable type and is used for allowing or preventing certain actions inside a Tauri command.\n\nThe scope is passed to the command and handled/enforced by the command itself.",
|
|
|
+ "type": "object",
|
|
|
+ "properties": {
|
|
|
+ "allow": {
|
|
|
+ "description": "Data that defines what is allowed by the scope.",
|
|
|
+ "type": [
|
|
|
+ "array",
|
|
|
+ "null"
|
|
|
+ ],
|
|
|
+ "items": {
|
|
|
+ "$ref": "#/definitions/Value"
|
|
|
+ }
|
|
|
+ },
|
|
|
+ "deny": {
|
|
|
+ "description": "Data that defines what is denied by the scope.",
|
|
|
+ "type": [
|
|
|
+ "array",
|
|
|
+ "null"
|
|
|
+ ],
|
|
|
+ "items": {
|
|
|
+ "$ref": "#/definitions/Value"
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ },
|
|
|
+ "Value": {
|
|
|
+ "description": "All supported ACL values.",
|
|
|
+ "anyOf": [
|
|
|
+ {
|
|
|
+ "description": "Represents a null JSON value.",
|
|
|
+ "type": "null"
|
|
|
+ },
|
|
|
+ {
|
|
|
+ "description": "Represents a [`bool`].",
|
|
|
+ "type": "boolean"
|
|
|
+ },
|
|
|
+ {
|
|
|
+ "description": "Represents a valid ACL [`Number`].",
|
|
|
+ "allOf": [
|
|
|
+ {
|
|
|
+ "$ref": "#/definitions/Number"
|
|
|
+ }
|
|
|
+ ]
|
|
|
+ },
|
|
|
+ {
|
|
|
+ "description": "Represents a [`String`].",
|
|
|
+ "type": "string"
|
|
|
+ },
|
|
|
+ {
|
|
|
+ "description": "Represents a list of other [`Value`]s.",
|
|
|
+ "type": "array",
|
|
|
+ "items": {
|
|
|
+ "$ref": "#/definitions/Value"
|
|
|
+ }
|
|
|
+ },
|
|
|
+ {
|
|
|
+ "description": "Represents a map of [`String`] keys to [`Value`]s.",
|
|
|
+ "type": "object",
|
|
|
+ "additionalProperties": {
|
|
|
+ "$ref": "#/definitions/Value"
|
|
|
+ }
|
|
|
+ }
|
|
|
+ ]
|
|
|
}
|
|
|
}
|
|
|
}
|