Giter VIP home page Giter VIP logo

Comments (6)

mlsjla avatar mlsjla commented on June 13, 2024 4

建议前端基于nuxt3来写。

我已经基于您开源的gin-admin做了个简单的后台管理。

1、 casbin机制太过复杂, 直接创建了casbin-rule表,管理policy
2、之前的action_id 太过复杂难以理解, 将菜单menu 和 api权限分开管理。 即user_menu管理当前用户后台菜单显示项目。 casbin 管理userid对应的api权限。
3、前端基于nuxt3 element-plus tailwind dayui 开发, nuxt3自动管理路由,支持ssr, 支持生成静态站,很方便且规范。
4、 不仅仅是后台, 实际上此方案,可以是包含整站的解决方案。

总体就是:
移除了表 menu_action menu_action_resource

修改了role_menu结构, 将用户的menu权限记录在这里。

接口权限记录在casbin_rule内, 替换之前的action
这样, 权限一目了然, 更坚简单, 还少了一张表。

from gin-admin.

mchongjs avatar mchongjs commented on June 13, 2024

建议和prometheus及Grafana结合以便查看性能指标,当前访问接口等信息。

from gin-admin.

chenyu1990 avatar chenyu1990 commented on June 13, 2024

后台菜单会不会有点鸡肋。
我现在的项目,菜单只是用来给casbin列路径。
前端菜单的显示控制用 umi-plugin-access 来控制,简直不要太爽。
而且access还能在页面里根据权限判断,显示不同内容。
当前用户信息里返回了 roles,access.js 里处理roles就好了。

from gin-admin.

chenyu1990 avatar chenyu1990 commented on June 13, 2024

建议前端基于nuxt3来写。

我已经基于您开源的gin-admin做了个简单的后台管理。

1、 casbin机制太过复杂, 直接创建了casbin-rule表,管理policy 2、之前的action_id 太过复杂难以理解, 将菜单menu 和 api权限分开管理。 即user_menu管理当前用户后台菜单显示项目。 casbin 管理userid对应的api权限。 3、前端基于nuxt3 element-plus tailwind dayui 开发, nuxt3自动管理路由,支持ssr, 支持生成静态站,很方便且规范。 4、 不仅仅是后台, 实际上此方案,可以是包含整站的解决方案。

总体就是: 移除了表 menu_action menu_action_resource

修改了role_menu结构, 将用户的menu权限记录在这里。

接口权限记录在casbin_rule内, 替换之前的action 这样, 权限一目了然, 更坚简单, 还少了一张表。

没用过 nuxt3。不知道跟 antd pro v5 的 protable + schema-form 比起来如何。两个组件完成 表+新建+编辑,就太方便了。

from gin-admin.

bing127 avatar bing127 commented on June 13, 2024

v9什么时候出

from gin-admin.

107295472 avatar 107295472 commented on June 13, 2024

怎么不考虑用svelte呢,比vue快

from gin-admin.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.