website methodology

(from stackoverflow)

I am currently writing a CMS and remember someone (it might have been on here) criticise the existing CMS for not having a robust enough user permissions system. I've got a method planned out but it I feel it has fallen into the usual trap of being a bit too fine-grained which makes understanding and implementing it a horror for end users.

I think having a range of default user roles with permissions would be the answer to this, so I suppose my question is this:

What are the default roles you would like to see in a CMS and what sort of permissions would be associated with these?

This is the "best practice" I have ended up with in most projects and am very happy with:

1. Roles

When it comes to roles, I recommend great flexibility, i.e. the ability to create and define user accounts and groups freely (roles like "contributor", "manager" etc. are not hard-coded, but put into a configuration file that can be changed per application). The role configuration is unaccessible to the user, but the engine itself should be free from hard-coded roles.

2. Rights

Rights is where things need to be easy to understand and implement.

I have made very good experiences working with, and checking against, very fine-grained rights on the code / API level:

  • see
  • view
  • edit
  • change name
  • rename
  • delete
  • move
  • change rights
  • etc.

but the user never sees those. For them, they are grouped into a very small number of "right groups":

  • Read Only
  • Edit
  • Administer = Move, rename....

The user never sees the "move" right, but only the "Administer" rights group.

That way, you retain the full power of fine-grained rights in your code for the future - you can, for example, easily accommodate for a rule like "interns must be able to edit pages, but not be able to change their titles, nor to delete them", adding a valuable asset to the CMS. For the end user, this functionality remains invisible, and the rights system easy to use.


内容概要:本文档《互联网大厂200道高频Node.js面试题.pdf》涵盖了Node.js技术栈的核心知识点及实际应用技巧。文档详细列举了200个常见面试问题及其解答,内容涵盖Node.js的基础概念、事件循环机制、错误处理、模块系统、Buffer和Stream的使用、进程与线程的区别及应用、异步操作的多种实现方式、集群模式下的性能优化、WebSocket的实现、大文件处理、全局对象的使用、Promise和async/await的优势、RESTful API的设计、环境变量管理、跨域请求处理、调试工具、内存管理和优化、Worker Threads的应用、负载均衡策略、测试框架的选择、静态文件服务、日志管理、HTTP/2的支持、数据库连接方式、微服务架构的设计、JWT认证、性能监控、文件上传与下载、Reactor模式的理解、定时任务的设置、多语言支持、文件预览、安全实践、Server-Sent Events(SSE)的使用、微前端集成、长轮询、GraphQL服务的构建、命令行工具的开发、单元测试编写、process对象的功能、优雅退出的方法、os模块的作用、CPU密集型任务的处理、加密解密、文件锁定、TCP服务创建、DNS解析、事件循环优化、数据压缩、内存缓存、自定义协议、分布式锁、工具函数、文件分片处理、HTTPS实现、请求超时控制、日志切割、URL参数解析、请求重试机制、V8模块的作用、文件内容搜索、断言模块的使用、动态路由、国际化域名处理、性能测量、文件同步、REPL交互环境、请求限
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值