Comments (6)
建议前端基于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.
建议和prometheus及Grafana结合以便查看性能指标,当前访问接口等信息。
from gin-admin.
后台菜单会不会有点鸡肋。
我现在的项目,菜单只是用来给casbin列路径。
前端菜单的显示控制用 umi-plugin-access 来控制,简直不要太爽。
而且access还能在页面里根据权限判断,显示不同内容。
当前用户信息里返回了 roles,access.js 里处理roles就好了。
from gin-admin.
建议前端基于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.
v9什么时候出
from gin-admin.
怎么不考虑用svelte呢,比vue快
from gin-admin.
Related Issues (20)
- Start failed - sonyflake not created HOT 2
- ParseJSON 建议优化一下
- 有人在生产中使用吗
- swagger 报错:No operations defined in spec!
- 有人遇到过程序偶尔自己退出的问题吗
- 问个不关代码的,V10什么时候发 HOT 7
- Injector结构体的CasbinEnforcer、Auth字段是否多余 HOT 1
- TablePrefix没有生效 HOT 3
- jwtauth store service is not working ?
- Failed to read configuration file
- rbac_model.conf should use keyMatch3 HOT 1
- gin-admin-cli生成的项目有问题 HOT 3
- 感觉启动速度有点慢
- 有交流群吗 HOT 1
- gin-admin-cli生成代码报错 HOT 1
- /api/v1/loggers?current=1&pageSize=10 ERROR: column b.id does not exist (SQLSTATE 42703) HOT 1
- [功能建议] Module 是不是可以考虑使用接口 ?
- Error while generate a new module
- 移动前端api 怎么实现 HOT 1
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 gin-admin.