Hi Boris,
As a user rights i've func that reads from user rights table (user01.dbf) and its disabling menus as userright at runtime.
* usage on menu skip for section
! menuright(m.gcUser,"stock","read")
user01.dbf structure like below
userid c(10), formname c(50) , read L,write L,edit L,delete L
Function MenuRight
Lparameters tcUser, tcRightName, tcRight
Local llResult, lcCommand
If ! Used("user01")
Use Addbs(m.gcData)+'user01' Again Shared In 0
Endif
If Seek(Alltrim(m.tcUser) + Alltrim(m.tcRightName), "user01", "kulhak")
m.lcCommand = "user01." + m.tcRight
m.llResult = &lcCommand
Endif
Return m.llResult
Endfunc
this works fine
i wantto disabled menus for module based such as Invoice,Customer etc.. this requer me eg. some clients bought all of modules , some clients bought only Invoice ... so that don't wantto use different sources only will set the modules on a dbf (such as modules) then app will disable related menus ( module menus )
ohh hope that explain :)