来自非管理员用户的 Alfresco 网络脚本 运行 获得 401-Unauthorized
Alfresco webscripts run from non-admin users getting 401-Unauthorized
我已经在 alfresco community edition-5.1.x 中创建了 webscript,当非管理员用户 运行 脚本不工作时 401-Unauthorized
当 运行来自管理员用户,它工作正常,可以帮助我如何 运行 来自非管理员用户的网络脚本。
您需要检查您的 webscript definition :
认证部分必须是用户。其他选择是管理员(可能是你的情况)或 none(无身份验证)。
<webscript>
<shortname>Hello World</shortname>
<description>Hello World Sample Web Script that responds back with a greeting</description>
<url>/tutorial/helloworld</url>
<format default="html"></format>
<authentication>user</authentication>
<family>Alfresco Tutorials</family>
</webscript>
您可以 运行 您的网络脚本 non-admin 用户。您必须使用 runas="admin"
属性为您的 webscript 的 desc 文件提供身份验证标记,如下所示:
<authentication runas="admin">user</authentication>
我已经在 alfresco community edition-5.1.x 中创建了 webscript,当非管理员用户 运行 脚本不工作时 401-Unauthorized
当 运行来自管理员用户,它工作正常,可以帮助我如何 运行 来自非管理员用户的网络脚本。
您需要检查您的 webscript definition :
认证部分必须是用户。其他选择是管理员(可能是你的情况)或 none(无身份验证)。
<webscript>
<shortname>Hello World</shortname>
<description>Hello World Sample Web Script that responds back with a greeting</description>
<url>/tutorial/helloworld</url>
<format default="html"></format>
<authentication>user</authentication>
<family>Alfresco Tutorials</family>
</webscript>
您可以 运行 您的网络脚本 non-admin 用户。您必须使用 runas="admin"
属性为您的 webscript 的 desc 文件提供身份验证标记,如下所示:
<authentication runas="admin">user</authentication>