Skip to content

Commit

Permalink
feat: Added optional parameter 'force' in usergrants.request (#186)
Browse files Browse the repository at this point in the history
* feat: Added optional parameter 'force' in usergrants.request
* Addressed review comments
  • Loading branch information
kevinshahfws authored Sep 26, 2023
1 parent 5ac54bd commit 31801ca
Show file tree
Hide file tree
Showing 2 changed files with 60 additions and 3 deletions.
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

59 changes: 58 additions & 1 deletion src/openrpc/user_grants.json
Original file line number Diff line number Diff line change
Expand Up @@ -391,6 +391,14 @@
"minItems": 1
},
"required": true
},
{
"name": "options",
"summary": "Request options",
"schema": {
"$ref": "#/components/schemas/RequestOptions"
},
"required": false
}
],
"result": {
Expand All @@ -405,7 +413,7 @@
},
"examples": [
{
"name": "Default result",
"name": "Default result #1",
"params": [
{
"name": "appId",
Expand Down Expand Up @@ -436,6 +444,45 @@
}
]
}
},
{
"name": "Default result #2",
"params": [
{
"name": "appId",
"value": "certapp"
},
{
"name": "permissions",
"value": [
{
"role": "use",
"capability": "xrn:firebolt:capability:localization:postal-code"
}
]
},
{
"name": "options",
"value": {
"force": true
}
}
],
"result": {
"name": "defaultResult",
"value": [
{
"app": {
"id": "certapp",
"title": "Certification App"
},
"state": "granted",
"capability": "xrn:firebolt:capability:localization:postal-code",
"role": "use",
"lifespan": "powerActive"
}
]
}
}
]
}
Expand Down Expand Up @@ -528,6 +575,16 @@
},
"additionalProperties": false,
"required": []
},
"RequestOptions": {
"title": "RequestOptions",
"type": "object",
"properties": {
"force": {
"type": "boolean",
"description": "Whether to force for user grant even if the previous decision stored"
}
}
}
}
}
Expand Down

0 comments on commit 31801ca

Please sign in to comment.