如何将一个用户分配给另一个用户? [英] How do I assign one user to another user?

查看:103
本文介绍了如何将一个用户分配给另一个用户?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我创建了一个表单,其中有一个选项或两个用户类型。


收集的所有数据都将发布到我的msaccess表中。


我有用户java servlet将html链接到msaccess表,以便用户可以查看表。


现在我需要完成另一个我可以允许的任务第一个用户将第二个用户分配给我的数据库中可用的任何现有第一个用户。


我希望有人可以告诉我如何去做这个。

解决方案

创建权限表。给每个用户一个角色,并在那里存储用户名和角色。

然后编写一些规则,如管理员等。总是可以分配一个普通用户,但不是相反。

因此,如果第一个用户尝试分配第二个用户,如果允许,则查询权限表。

您好Charmaine,


您能否告知如何创建权限表。我是java和jsp的新手,所以不知道如何创建一个。有没有可以指向我的链接,可以向我展示你提到的例子?


你可以用SQL命令创建一个表:

展开 | 选择 | Wrap | 行号


I have created a form where there''s an option or 2 user types.

All the data collected will be posted to my msaccess table.

I have user java servlet to link the html to msaccess table so that user can view the table.

Now I need to complete another task which is I can allow 1st user to assign 2nd user to any existing 1st users available on my database.

I hope someone can advise me how to go about doing this.

解决方案

create a permission table. Give each user a role and store the user name and role there.
Then code some rules like an "administrator" can always assign a "normal user", but not the other way around.
So if 1st user tries to assign a 2nd user, query the permission table if he is allowed or not.


Hi Charmaine,

Could you please advise how create a permission table. I''m new in java and jsp so not sure how to create one. Is there any link you can point me to that can show me examples what you mentioned?


you can create a table with an SQL-command:

Expand|Select|Wrap|Line Numbers


这篇关于如何将一个用户分配给另一个用户?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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