SAAS HIVE596认证授权方案

API文档


用户权限判断

<p>[TOC]</p> <h3>功能介绍:</h3> <ul> <li>获取当前用户操作权限,素材或者文件的操作权限</li> </ul> <h3>接口约束:</h3> <ul> <li>无</li> </ul> <h3>URI:</h3> <p>用户操作权限: <code>GET {{baseUrl}}/auth/authentication/permissions</code> </p> <p>文件夹: <code>GET {{baseUrl}}/auth/authentication/permissions?action-id=folder&amp;contenid={contenid}</code> </p> <p>素材: <code>GET {{baseUrl}}/auth/authentication/permissions?action-id=entity&amp;contenid={contenid}</code> </p> <h3>请求消息:</h3> <p><strong>请求头</strong> 请求头如表1所示。 表1 请求参数:</p> <table> <thead> <tr> <th style="text-align: left;">参数名</th> <th style="text-align: left;">必选</th> <th style="text-align: left;">类型</th> <th>说明</th> </tr> </thead> <tbody> <tr> <td style="text-align: left;">sobeycloud-token</td> <td style="text-align: left;">是</td> <td style="text-align: left;">string</td> <td>用户token</td> </tr> <tr> <td style="text-align: left;">sobeycloud-site</td> <td style="text-align: left;">否</td> <td style="text-align: left;">string</td> <td>用户站点(签名方式的token必须)</td> </tr> </tbody> </table> <p><strong>请求参数</strong> 请求参数如表2所示。</p> <p>表2 请求参数:</p> <table> <thead> <tr> <th style="text-align: left;">参数名</th> <th style="text-align: left;">必选</th> <th style="text-align: left;">类型</th> <th>说明</th> </tr> </thead> <tbody> <tr> <td style="text-align: left;">action-id</td> <td style="text-align: left;">否</td> <td style="text-align: left;">string</td> <td>folder 是文件的操作权限,entity 素材的操作权限</td> </tr> <tr> <td style="text-align: left;">contenid</td> <td style="text-align: left;">否</td> <td style="text-align: left;">string</td> <td>action-id为folder,entity 必填素材id</td> </tr> </tbody> </table> <h3>请求示例:</h3> <pre><code>GET /auth/authentication/permissions?action-id=entity&amp;contenid=123123df sobeycloud-site: S1 sobeycloud-token: SjUAxwMUwkpuY+CNt1daEMoVAVE= </code></pre> <hr /> <h3>响应消息:</h3> <p><strong>响应参数:</strong> </p> <table> <thead> <tr> <th style="text-align: left;">参数名</th> <th style="text-align: left;">类型</th> <th>说明</th> </tr> </thead> <tbody> <tr> <td style="text-align: left;">--</td> <td style="text-align: left;">--</td> <td>--</td> </tr> </tbody> </table> <h3>响应示例:</h3> <p><strong>响应成功示例</strong> </p> <pre><code>{ "code": "0", "msg": "successful", "ext": [ { "candelete": true, "canexecute": true, "canread": true, "canwrite": true, "level": 15, "templatecode": "private_admin", "templatename": "private_admin" }, { "candelete": true, "canexecute": true, "canread": true, "canwrite": true, "level": 15, "templatecode": "default_550dcf92bd034039a9abae1ec5e3faa1", "templatename": "default_550dcf92bd034039a9abae1ec5e3faa1" }, { "candelete": true, "canexecute": true, "canread": true, "canwrite": true, "level": 15, "templatecode": "public_S1", "templatename": "public_S1" }, { "candelete": true, "canexecute": true, "canread": true, "canwrite": true, "level": 15, "templatecode": "owner_admin", "templatename": "owner_admin" } ] }</code></pre> <p><strong>响应失败示例</strong> </p> <pre><code> { "code": "Auth.0014", "msg": "系统内部错误" }</code></pre> <hr /> <h3>错误码</h3> <p>参考 <a href="https://www.showdoc.com.cn/mbhauth/7655637558569867" title="错误码说明">错误码说明</a></p> <h3>状态码</h3> <p>参考 <a href="https://www.showdoc.com.cn/mbhauth/7655637558569867" title="状态码说明">状态码说明</a></p>

页面列表

ITEM_HTML