12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849 |
- $PBExportHeader$f_find_fx_user_power.srf
- $PBExportComments$(协同)根据funcid查找当前用户是否具有该权限
- global type f_find_fx_user_power from function_object
- end type
- forward prototypes
- global function long f_find_fx_user_power (long arg_funcid, ref string arg_msg)
- end prototypes
- global function long f_find_fx_user_power (long arg_funcid, ref string arg_msg);long ret = 0
- if not IsValid(sys_func_pwr) then
- ret = 0
- arg_msg = '权限对象有误,请联系开发人员'
- goto ext
- end if
- if IsNull(sys_func_pwr) then
- ret = 0
- arg_msg = '权限对象有误(null),请联系开发人员'
- goto ext
- end if
- sys_func_pwr.SetFilter('')
- sys_func_pwr.Filter()
- long row = 0
- row = sys_func_pwr.Find('funcid = ' + string(arg_funcid), 1, sys_func_pwr.RowCount())
- if (row > 0) then
- ret = 1
- goto ext
- else
- ret = 0
- row = sys_func_all.Find('funcid = ' + string(arg_funcid), 1, sys_func_all.RowCount())
- if (row > 0) then
- arg_msg += '您没有"' + sys_func_all.Object.treename[row] + '"的权限,[' + string(arg_funcid) + ']~r~n'
- else
- arg_msg += '协同系统不存在该权限,[' + string(arg_funcid) + ']~r~n'
- end if
- goto ext
- end if
- ext:
- return ret
- //if (f_find_fx_user_power(0000, ref arg_msg) = 1) then
- //
- //end if
- end function
|