<app_uri>/sharesetting[.<format>]
appShareSetting resource is resource that records share settings of a single application. It is allowed to update the permission information of a specified application by sending PUT request. The creator and the administrator are allowed to update the permission info.
Supported Methods:
Supported output formats: rjson, json, html, xml.
Implement the HTTP request on the following URI, where supermapiportal is the server name, with rjson being the output format.
http://supermapiportal:8090/iportal/web/apps/{appId}/sharesetting.rjson
Modifies the share settings of the specified application.
Following arguments need to be passed in the request sent.
Name | Type | Description |
entityName | String | Entity name. Corresponding USER, ROLE, GROUP, IPORTALGROUP. |
entityType | EntityType | Entity type. including USER, ROLE, GROUP, IPORTALGROUP. |
permissionType | PermissionType | Permission type. including READ, READWRITE, DELETE. |
entityId | Integer | Entity id. used for group permission. |
The structure of the response resource representation is as follows:
Field | Type | Description |
succeed | boolean | Whether the app share settings has been updated successfully. |
error | Httperror | Error information. This field will not be displayed if the app share settings has been successfully modified. |
There are five types of permissions for updating single app share settings with appShareSetting resource: private, public, specified department, specified group and specified user. Public means all users (anonymous users included) are allowed to view and all users (login users only) are allowed to edit. Meanwhile, this resource can be set as public, specified departments, specified users and specified groups together, or one of settings only. The following example shows you how to set share settings one by one (please ensure that app creator or administrator logged in):
1. Private
Modify the authorized information as private. In other words, only the app creator liyl can edit this app. Execute PUT request to appShareSetting resource: http://supermapiportal:8090/iportal/web/apps/8/sharesetting.rjson. The request body is as follows:
[
{
"aliasName": "liyl",
"entityId": null,
"entityName": "liyl",
"entityType": "USER",
"permissionType": "DELETE"
}
]
The rjson format returned is as follows:
{ "succeed": true}
2. Public
Modify the authorized information as public. In other words, all users (anonymous users included) can check, and all users (login users only) can edit. Execute PUT request for appShareSetting resource: http://supermapiportal:8090/iportal/web/apps/8/sharesetting.rjson. The request body is as follows:
[
{
"entityName": "GUEST",
"entityType": "USER",
"permissionType": "READWRITE"
}
]
The rjson format returned is as follows:
{ "succeed": true}
3.Specified department
Modify the authorized information as the specified department. That means members in the same department as current user can edit this app. Execute PUT request to the appShareSetting resource: http://supermapiportal:8090/iportal/web/apps/8/sharesetting.rjson. The request body is as follows:
[
{
"entityId": 2,
"entityType": "DEPARTMENT",
"permissionType": "READWRITE"
}
]
The rjson format returned is as follows:
{ "succeed": true}
4. Specified group
Modify the authorized information as the specified group members with ID 2 to have the rights to edit this app. Execute PUT request for the appShareSetting resource: http://supermapiportal:8090/iportal/web/apps/8/sharesetting.rjson. The request body is as follows:
[
{
"entityId": 2,
"entityType": "IPORTALGROUP",
"permissionType": "READWRITE"
}
]
The rjson format returned is as follows:
{ "succeed": true}
5. Specified user
Modify the authorized information as the specified user wanghl who to have the rights to edit this app. Execute PUT request for the appShareSetting resource: http://supermapiportal:8090/iportal/web/apps/8/sharesetting.rjson. The request body is as follows:
[
{
"entityName": "wanghl",
"entityType": "USER",
"permissionType": "READWRITE"
}
]
The rjson format returned is as follows:
{ "succeed": true}