设计模式权限 [英] Design pattern permissions

查看:144
本文介绍了设计模式权限的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述



我有一个已经在此处发布的问题.(我以前的相关问题在这里权限的设计模式 [^ ],用于加载的设计模式 [

Hi,

I have a question that already posted here.(My previous related questions here Design pattern for permissions[^], Design pattern for loading[^])

I want to build a project (web site) that have a few kind of users.

Administrator - that can do every thing in the site
Registered user - that can do every thing in his page.
Unregistered User - that can only watch the web.

My question is what is the design pattern or that I should use?? and can I do it?
Need answer as fast as possible.
Thank you.

推荐答案

您必须存储具有权限的变量,然后安全地进行响应...

为了做到这一点,我将使用PHP或ASP ...可以进行编程的东西,并且可以根据变量等以不同的方式做出反应.

-您可以使用标头查看登录信息,如果登录未完成,则仅询问密码,不显示其他任何内容.

-您应该根据用户级别准备不同的页面.

-请记住将外部代码(或每个人都看不到的代码)放在搜索引擎的机器人看不到的地方...

HTH ...
You''ll have to store a variable with the permissions and then react in consecuence...

In order to do that I would go to PHP or ASP... something that could be programmed and that could react in different ways depending on variables and so.

- You could use a header that would look at the login information, if the login is not done, then ask only for the passwords and don''t show anything else.

- You should prepare different pages depending on the level of the user.

- Remember to put the external code (or the code that can''t be seen by everyone) in a place that robots from the search engines can''t see it...

HTH...


这篇关于设计模式权限的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆