定义程序中的安全级别 [英] Define security levels in a Program

查看:61
本文介绍了定义程序中的安全级别的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好,



我需要在我的程序中定义安全级别。

就像我们尝试的时候Windows要求管理员权限一样安装软件。

这是一种在执行任务之前检查权限的机制。

我需要知道的是,我如何在我的java程序中实现这种方法。 />
我的一位PHP开发人员告诉我,在他们的网络应用程序中,他们通过授予运行名为 actions 的权限来控制用户的活动。

根据他的说法,他们已经实现了一些包含所有动作的数据库表。动作已映射到某些组。这些组根据用户需要授予的权限添加到用户。

之后,如果管理员用户登录,他将看到所有内容。但如果标准用户登录,他将无法看到任何管理页面。

由于PHP有动作,他们可以这样做。

在JAVA,怎么能我实现了这种方法吗?

请指教。



我唯一需要知道的是如何做到这一点。



请记住,我对JAVA&编程世界。

Hi All,

I need to define security levels in my program.
Just like windows asks admin privilege when we try to install a software.
It's a mechanism of checking privilege before executing a task.
I need to know is, how I can implement this approach in my java program.
A friend of mine who is a PHP developer told me that, In their web apps
they control users activities by giving permissions to run something called actions.
According to him they have implement some db tables which contains all actions & actions have mapped to some groups. those groups add to users according to privileges that user need to grant.
after that if a admin user logs in he will see everything. but if a standard user logs in he won't be able to see any admin pages.
Since PHP has actions, they could do this.
In JAVA, how can I achieve this approach?
Please advise.

Only thing I need to know is how to do this.

Please remember that I'm very new to JAVA & Programming world.

推荐答案

您可以将特权绑定到程序函数。例如,所有用户都可以执行非常基本的功能,比如检查他们的个人资料的详细信息,而只有特权用户可以利用更重要的功能,比如删除一些数据。
You coul bind privileges to program functions. For instance, all users could perform very basic functions, like, say, checking details of their profile while only privileged users could take advantage of more critical functions like, say, delete some data.


这篇关于定义程序中的安全级别的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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