JIRA 权限 API 中的 deprecatedKey 是什么以及用途是什么
What is deprecatedKey in JIRA permission API and what is usage
我正在尝试了解 JIRA 权限 API。在调用他们的许可服务时,即
http://example.com:8080/jira/rest/api/2/mypermissions [GET]
/rest/api/2/mypermissions?projectKey&projectId&issueKey&issueId
我对当前登录用户的响应低于:
它正在为各种权限返回 2 个属性 key/node:
- 有权限
- 弃用密钥
你能说说它的实现是什么以及它是如何工作的吗?
观察响应后我发现
deprecatedKey
属性 不是所有权限节点
有多个具有相同 id
(即 permissionId)但不同 deprecatedKey
参数
的权限
根据我对 the documentation the permission model changed with JIRA 6.4 and the old permission keys became obsolete. Yet they were kept in the API for backward compatibility 原因的理解(即使用旧 API 的遗留客户端不会在 API 更改时损坏)。
引用:
Prior to version 6.4 this service returned project permissions with keys corresponding to com.atlassian.jira.security.Permissions.Permission
constants. Since 6.4 those keys are considered deprecated and this service returns system project permission keys corresponding to constants defined in com.atlassian.jira.permission.ProjectPermissions
. Permissions with legacy keys are still also returned for backwards compatibility, they are marked with an attribute deprecatedKey=true. The attribute is missing for project permissions with the current keys.
这意味着例如在 v6.4 之前的 JIRA 中有一个名为 VIEW_WORKFLOW_READONLY
的权限。从 6.4 开始,可能添加了另一个权限来废弃此权限(尽管我不知道在这个具体示例中是哪个)。所以现在这个权限要么有一个不同的密钥,要么被合并到另一个权限集中。拆分为几个新引入的权限也是一种选择。
弃用意味着在开发新的客户端应用程序时不应再使用这个旧的权限密钥,并且它将在 API 的未来版本中删除。
详细了解弃用 on Wikipedia。
其他属性 havePermission
仅表示请求者在给定上下文 (Project/Issue) 中被授予使用特定密钥的权限。
我正在尝试了解 JIRA 权限 API。在调用他们的许可服务时,即
http://example.com:8080/jira/rest/api/2/mypermissions [GET]
/rest/api/2/mypermissions?projectKey&projectId&issueKey&issueId
我对当前登录用户的响应低于:
它正在为各种权限返回 2 个属性 key/node:
- 有权限
- 弃用密钥
你能说说它的实现是什么以及它是如何工作的吗?
观察响应后我发现
deprecatedKey
属性 不是所有权限节点
有多个具有相同 id
(即 permissionId)但不同 deprecatedKey
参数
根据我对 the documentation the permission model changed with JIRA 6.4 and the old permission keys became obsolete. Yet they were kept in the API for backward compatibility 原因的理解(即使用旧 API 的遗留客户端不会在 API 更改时损坏)。
引用:
Prior to version 6.4 this service returned project permissions with keys corresponding to
com.atlassian.jira.security.Permissions.Permission
constants. Since 6.4 those keys are considered deprecated and this service returns system project permission keys corresponding to constants defined incom.atlassian.jira.permission.ProjectPermissions
. Permissions with legacy keys are still also returned for backwards compatibility, they are marked with an attribute deprecatedKey=true. The attribute is missing for project permissions with the current keys.
这意味着例如在 v6.4 之前的 JIRA 中有一个名为 VIEW_WORKFLOW_READONLY
的权限。从 6.4 开始,可能添加了另一个权限来废弃此权限(尽管我不知道在这个具体示例中是哪个)。所以现在这个权限要么有一个不同的密钥,要么被合并到另一个权限集中。拆分为几个新引入的权限也是一种选择。
弃用意味着在开发新的客户端应用程序时不应再使用这个旧的权限密钥,并且它将在 API 的未来版本中删除。
详细了解弃用 on Wikipedia。
其他属性 havePermission
仅表示请求者在给定上下文 (Project/Issue) 中被授予使用特定密钥的权限。