Comments (14)
插件开发获取用户信息文档不全
from plugin-starter.
文档问题建议到 halo-dev/docs 提交 issue,至于你说的引入第三方依赖报错,建议提供日志,以及引入的是什么依赖,目前无法复现
from plugin-starter.
/kind needs-information
from plugin-starter.
@guqing: The label(s) kind/needs-information
cannot be applied, because the repository doesn't have them.
In response to this:
/kind needs-information
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.
from plugin-starter.
https://github.com/Wechat-Group/WxJava
引入这个的企业微信开发,一写相关逻辑就会报错
from plugin-starter.
Wechat-Group/WxJava 引入这个的企业微信开发,一写相关逻辑就会报错
建议提供复现步骤以及详细的日志,而不是这样笼统的描述,我怎么复现呢
from plugin-starter.
暂时放弃这个依赖了,自己实现功能了,不理它先
想问一下怎么样在插件理做免登录验证的接口
from plugin-starter.
暂时放弃这个依赖了,自己实现功能了,不理它先 想问一下怎么样在插件理做免登录验证的接口
参考文档 聚合角色
通过定义角色模板并聚合到 anonymous 角色上实现免登陆
from plugin-starter.
好的,谢谢
from plugin-starter.
from plugin-starter.
角色模板的 rules 配置错了,参考文档:API 权限控制
角色模板的 rules 中的 apiGroups,resources 根据路由规则来套 /apis/<apiGroup>/<version>/<resource>[/<resourceName>/<subresource>]
因此按照你定义的路由,app 是 resource,reveiveMsg 是 resourceName
from plugin-starter.
from plugin-starter.
试试
apiVersion: v1alpha1
kind: Role
metadata:
name: qywx-role
labels:
halo.run/role-template: "true"
rbac.authorization.halo.run/aggregate-to-anonymous: "true"
rules:
# 以 apis 开头的 API 是资源型 URL,需要指定 apiGroups 和 resources
- apiGroups: [ "wqlin.halo.run" ]
resources: [ "app" ]
resourceNames: [ "receiveMsg" ]
verbs: [ "get" ]
# 这个 URL 虽然以 /apis 开头,但是路径中有 resourceName 段,创建时通过不可能在路径中包含 resourceName,所以是非资源型 URL
- nonResourceURLs: [ "/apis/wqlin.halo.run/v1alpha1/app/receiveMsg" ]
verbs: [ "create" ]
需要注意的是,开发插件时建议使用自己的域名作为 group,不要使用 halo.run,为了根据规则定义合适的 API,你可以选择这样定义
/apis/api.your-domain.com/v1alpha1/apps/-/receiveMsg
即通过-
来代替名称,将 action 放到后面一段
from plugin-starter.
好的,谢谢
from plugin-starter.
Related Issues (11)
- 执行 gradlew.bat pnpmInstall时报异常 HOT 4
- 您能告诉我如何在生产环境中使用该插件吗? HOT 3
- 执行./gradlew build后编码错误 HOT 3
- 将 console 源码目录重命名为 ui HOT 1
- Incorrect `robots.txt`
- Devtools启动项目不能自定义springboot的profile
- 【特性】能否提供对 RESTFUL 风格的接口的支持 HOT 2
- 想问一下插件之间可以互相引用吗 HOT 2
- 执行./gradlew.bat pnpmInstall HOT 1
- use this template找不到use this template
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from plugin-starter.