8.2.4. パーミッション

Security Management REST API は Business Central のグループ、ロール、およびユーザーに割り当てられたパーミッションを管理するための以下のエンドポイントをサポートします。Security Management REST API のベース URL は http://SERVER:PORT/business-central/rest/ です。ユーザーロール admin では、すべての要求で HTTP Basic 認証またはトークンベースの認証が必要です。

[GET] /groups/{groupName}/permissions

指定のグループに付与されている全パーミッションを返します。

表8.9 要求パラメーター

Name詳細タイプ要件

groupName

パーミッションを取得するグループの名前

String

必須

サーバーの応答例 (JSON)

{
	"homePage": "HomePerspective",
	"priority": -10,
	"project": {
		"read": {
			"access": false,
			"exceptions": []
		},

	},
	"spaces": {
		"read": {
			"access": true,
			"exceptions": [
				"MySpace"
			]
		},
	},
	"editor": {
		"read": {
			"access": false,
			"exceptions": [
				"GuidedDecisionTreeEditorPresenter"
			]
		},
		"create": null,
		"update": null,
		"delete": null,
		"build": null
	},
	"pages": {
		"read": {
			"access": true,
			"exceptions": []
		},
		"build": null
	},
	"workbench": {
		"editDataObject": false,
		"plannerAvailable": false,
		"editGlobalPreferences": false,
		"editProfilePreferences": false,
		"accessDataTransfer": false,
		"jarDownload": true,
		"editGuidedDecisionTableColumns": true
	}
}

[GET] /roles/{roleName}/permissions

指定のロールに付与されている全パーミッションを返します。

表8.10 要求パラメーター

Name詳細タイプ要件

roleName

パーミッションを取得するロールの名前

String

必須

サーバーの応答例 (JSON)

{
	"homePage": "HomePerspective",
	"priority": -10,
	"project": {
		"read": {
			"access": false,
			"exceptions": []
		},

	},
	"spaces": {
		"read": {
			"access": true,
			"exceptions": [
				"MySpace"
			]
		},
	},
	"editor": {
		"read": {
			"access": false,
			"exceptions": [
				"GuidedDecisionTreeEditorPresenter"
			]
		},
		"create": null,
		"update": null,
		"delete": null,
		"build": null
	},
	"pages": {
		"read": {
			"access": true,
			"exceptions": []
		},
		"build": null
	},
	"workbench": {
		"editDataObject": false,
		"plannerAvailable": false,
		"editGlobalPreferences": false,
		"editProfilePreferences": false,
		"accessDataTransfer": false,
		"jarDownload": true,
		"editGuidedDecisionTableColumns": true
	}
}

[GET] /users/{userName}/permissions

指定のユーザーに付与されている全パーミッションを返します。

表8.11 要求パラメーター

Name詳細タイプ要件

userName

パーミッションを取得するユーザーの名前

String

必須

サーバーの応答例 (JSON)

{
	"homePage": null,
	"priority": null,
	"project": {
		"read": {
			"access": false,
			"exceptions": []
		},

	},
	"spaces": {
		"read": {
			"access": true,
			"exceptions": [
				"MySpace"
			]
		},
	},
	"editor": {
		"read": {
			"access": false,
			"exceptions": [
				"GuidedDecisionTreeEditorPresenter"
			]
		},
		"create": null,
		"update": null,
		"delete": null,
		"build": null
	},
	"pages": {
		"read": {
			"access": true,
			"exceptions": []
		},
		"build": null
	},
	"workbench": {
		"editDataObject": false,
		"plannerAvailable": false,
		"editGlobalPreferences": false,
		"editProfilePreferences": false,
		"accessDataTransfer": false,
		"jarDownload": true,
		"editGuidedDecisionTableColumns": true
	}
}

[Post] /groups/{groupName}/permissions

指定したグループのパーミッションを更新します。

表8.12 要求パラメーター

Name詳細タイプ要件

groupName

パーミッションを更新するグループの名前

String

必須

要求ボディーの例 (JSON)

{
  "homepage": "HomePerspective",
  "priority": 10,
  "pages": {
    "create": true,
    "read": false,
    "delete": false,
    "update": false,
    "exceptions": [
      {
        "name": "HomePerspective",
        "permissions": {
          "read": true
        }
      }
    ]
  },
  "project": {
    "create": true,
    "read": true,
    "delete": false,
    "update": false,
    "Build": false
  },
  "spaces": {
    "create": true,
    "read": true,
    "delete": false,
    "update": false
  },
  "editor": {
    "read": true
  },
  "workbench": {
    "editDataObject": true,
    "plannerAvailable": true,
    "editGlobalPreferences": true,
    "editProfilePreferences": true,
    "accessDataTransfer": true,
    "jarDownload": true,
    "editGuidedDecisionTableColumns": true
  }
}

サーバーの応答例 (JSON)

{
  "status": "OK",
  "message": "Group newGroup permissions are updated successfully."
}

[Post] /roles/{roleName}/permissions

指定のロールのパーミッションを更新します。

表8.13 要求パラメーター

Name詳細タイプ要件

roleName

パーミッションを更新するロールの名前

String

必須

要求ボディーの例 (JSON)

{
	"homepage": "HomePerspective",
	"priority": 10,
	"pages": {
		"create": true,
		"read": false,
		"delete": false,
		"update": false,
		"exceptions": [{
			"name": "HomePerspective",
			"permissions": {
				"read": true
			}
		}]
	},
	"project": {
		"create": true,
		"read": true,
		"delete": false,
		"update": false,
		"Build": false
	},
	"spaces": {
		"create": true,
		"read": true,
		"delete": false,
		"update": false
	},
	"editor": {
		"read": true
	},
	"workbench": {
		"editDataObject": true,
		"plannerAvailable": true,
		"editGlobalPreferences": true,
		"editProfilePreferences": true,
		"accessDataTransfer": true,
		"jarDownload": true,
		"editGuidedDecisionTableColumns": true
	}
}

サーバーの応答例 (JSON)

{
  "status": "OK",
  "message": "Role newRole permissions are updated successfully."
}

8.2.4.1. Business Central でサポートされているパーミッション

Red Hat Process Automation Manager で使用できるパーミッションは次のとおりです。管理者はこれらのパーミッションを使用して、Business Central のグループ、ロール、またはユーザーに特定のアクションを許可します。

優先順位

優先順位は、複数のロールまたはグループを割り当てられたユーザーの優先度を定義する整数です。新規グループの優先順位のデフォルト値は -100 です。Business Central で優先順位として整数値を設定できます。優先順位は、以下のルールを使用して解決されます。

表8.14 優先順位値のテーブル

整数値優先順位

-5 未満

非常に低い

-5 から 0

0 相当

普通

0 から 5

6 以上

非常に高い

ホームページ
ホームページは、ユーザーのデフォルトのランディングページを示します。
ワークベンチ

ワークベンチは、以下の定義済みのパーミッションで構成されます。

{
  "editDataObject": true,
  "plannerAvailable": true,
  "editGlobalPreferences": true,
  "editProfilePreferences": true,
  "accessDataTransfer": true,
  "jarDownload": true,
  "editGuidedDecisionTableColumns": true
}
ページ、エディター、スペース、およびプロジェクト

以下は、リソースタイプに基にしたパーミッションで使用可能な値です。

  • PAGES: read,create,update,delete
  • EDITOR: read
  • SPACES: read,create,update,delete
  • PROJECT: read,create,update,delete,build

以下のコードを使用して、PagesEditorSpaces、および Projects のパーミッションに例外を追加できます。

{
  "pages": {
    "read": false,
    "exceptions": [
      {
        "resourceName": "ProcessInstances",
        "permissions": {
          "read": false
        }
      },
      {
        "resourceName": "ProcessDefinitions",
        "permissions": {
          "read": false
        }
      }
    ]
  }
}

name 属性は、例外として追加するリソースの ID です。以下の REST API エンドポイントを使用して、使用可能な ID 一覧を取得します。REST API ベースの URL は http://SERVER:PORT/business-central/rest/ です。

  • [GET] /perspectives: Business Central での全ページのパースペクティブ名を返します。
  • [GET] /editors: Business Central の全エディターを返します。
  • [GET] /spaces: Business Central の全スペースを返します。
  • [GET] /spaces/{spaceName}/projects: 指定のスペースのプロジェクトを返します。

ページのサーバー応答の例 (JSON)

"pages": {
	"create": true,
	"read": false,
	"exceptions": [
    {
		"name": "HomePerspective",
		"permissions": {
			"read": true
		}
	}
]
}