请问大家软件的权限管理是如何做的?(30分)

  • 主题发起人 主题发起人 caochen
  • 开始时间 开始时间
C

caochen

Unregistered / Unconfirmed
GUEST, unregistred user!
比如说单据的新增、修改、删除、审核等,还有基础资料的操作,具体到每一个功能,
大家如何做的?能否给点建议?
 
将权限放在一张表中,在系统登录的时候,读这张表,赋予相应的权限
 
TAction + tag
 
to: peta
能否详细一点吗?谢谢
 
我Action能控制每个菜单的权限,但具体到每个功能就不行了。
 
1.Create a [RightTabel] to hold the right define of your program.

{ Tag, Name, userID, Enabled }

2.Check_Right(Tag,userID) is a function which
can return the [enabled] field value of [RightTabel].

3.In every form's onformshow call the procedure below.

procedure Check_Power(frm_One: TForm);
var
i: integer;
begin
for i := 0 to frm_One.ComponentCount - 1 do
begin
if frm_One.Components is TControl then
begin
TControl(frm_One.Components).Enabled := Check_Right(frm_One.Components.Tag,userID);
end
end;
end;
 
用数据库实现
 
后退
顶部