Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

开放路径访问权限方法 #155

Closed
otakustay opened this issue Feb 12, 2015 · 1 comment
Closed

开放路径访问权限方法 #155

otakustay opened this issue Feb 12, 2015 · 1 comment

Comments

@otakustay
Copy link
Member

大部分系统是有导航的,导航的一个特色是其显示的链接与该路径是否可被访问的权限一致的,即一个页面不能访问,那么就不应该显示在导航上

页面的访问权限是配置在er中的,而导航是脱离于任何框架的实现,这会导致两边需要复用同一套权限逻辑,造成一定的重复设计或者重复编码

希望在er上开放一个{boolean} controller.isAllowedToVisit({string} path, {Object} actionOptions);方法,来获取一个路径(加上一些额外参数)是否允许被访问

默认实现是无视actionOptions,直接复用er内部的权限判断

@Justineo @leeight 对你们会有帮助吗,如果只对我自己有用我就不做了

@otakustay
Copy link
Member Author

问了一下,其它团队并没有类似的需求,因此现阶段仅局限在有需要的系统中定制就好了,不放到基础框架中造成框架的膨胀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant