什么是阻止某些用户访问某个页面的代码 [英] what is the code that to block certain user to acess the certain page

查看:69
本文介绍了什么是阻止某些用户访问某个页面的代码的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

亲爱的,


在我的应用程序中,用户使用他们的密码登录后,一些用户只能查看某个页面,而某些页面是保密的。我需要添加什么命令?

Dear all,

in my application, after user login with their password then some user just can view certain page and some page is confidential. What is the command that i need to add in?

推荐答案

Heya,Wish。


看看这个主题
Heya, Wish.

Have a look at this thread.


这比复杂得多输入一个命令,除了设计应用程序的人之外,没有人可以回答。至少在不查看代码的情况下。


您是否自己设计了这个应用程序?
That is much more complicated than just entering a single command and nobody can answer that except the one who designed the application. Not without looking through the code, at least.

Did you design this application yourself?



亲爱的,


在我的应用程序中,用户使用他们的密码登录后,一些用户只能查看某个页面而某些页面是保密的。我需要添加什么命令?
Dear all,

in my application, after user login with their password then some user just can view certain page and some page is confidential. What is the command that i need to add in?



因为我觉得没有现成的命令。有硬编码。


你的方式应该编码,取决于应用程序的设计。


如果我建议的方法,你可以做类似的事情。

随着您可以为帐户分配一些权限的用户凭据。

例如,有两个用户命名为user1,user2。我们将此用户1添加到Level1用户,将user2添加到Level2用户。

因此,Level1和Level2类似于具有应用程序不同权限的Group。

所以我们会说你的应用程序有5页。对于Level1用户,我将访问所有页面。对于Level2 Only Page1,2。

所以你必须在数据库级别启动它们。


所以这只是一个例子。编码取决于你。


[更多:如果不清楚请随意询问]

As I feel there is no ready-made command for this.Have to Hard code them.

The way you should code, will depend on the design of the application.

If I am suggesting a way for this, you can do something similar to this.
With the user credentials you can assign a some privileges to the account.
As a example say there are two users Named user1, user2. And we will add this user1 to Level1 users and user2 to the Level2 users.
So this Level1 and Level2 is something like a Group who have the different privileges of the Application.

So we will say there are 5 Pages of your Application. And for Level1 users I am giving the Access to all the pages. For Level2 Only Page1,2.
So You Have to Start these on the Database Level.

So This only a Example. Coding is Up to you.

[More: If this is unclear please feel free to ask]


这篇关于什么是阻止某些用户访问某个页面的代码的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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