Foxtable(狐表)用户栏目专家坐堂 → [求助]文件权限


  共有5872人关注过本帖树形打印复制链接

主题:[求助]文件权限

帅哥哟,离线,有人找我吗?
有点甜
  21楼 | 信息 | 搜索 | 邮箱 | 主页 | UC


加好友 发短信
等级:版主 帖子:85326 积分:427815 威望:0 精华:5 注册:2012/10/18 22:13:00
  发帖心情 Post By:2018/4/17 15:06:00 [显示全部帖子]

切换用户后,执行42楼代码,我测试没问题。

 回到顶部
帅哥哟,离线,有人找我吗?
有点甜
  22楼 | 信息 | 搜索 | 邮箱 | 主页 | UC


加好友 发短信
等级:版主 帖子:85326 积分:427815 威望:0 精华:5 注册:2012/10/18 22:13:00
  发帖心情 Post By:2018/4/17 15:56:00 [显示全部帖子]

user.name、user.group等信息(用户信息) 与 文件夹名称的关系是什么?根据什么逻辑判断?

 

比如

 

If Left(e.FileName,4+user.group.length) = "/公共/" & user.group Then

   msgbox(123)

End If


 回到顶部
帅哥哟,离线,有人找我吗?
有点甜
  23楼 | 信息 | 搜索 | 邮箱 | 主页 | UC


加好友 发短信
等级:版主 帖子:85326 积分:427815 威望:0 精华:5 注册:2012/10/18 22:13:00
  发帖心情 Post By:2018/4/17 16:06:00 [显示全部帖子]

msgbox(e.FileName)

If e.FileName < 4+user.Group.length Then

    e.cancel = true

ElseIf Left(e.FileName,4+user.group.length) <> "/公共/" & user.group Then

    e.cancel = true

End If

If e.Cancel Then
    MessageBox.Show("禁止删除" & user.group & "目录下的内容", "提示", MessageBoxButtons.OK,MessageBoxIcon.Information)
End If


 回到顶部
帅哥哟,离线,有人找我吗?
有点甜
  24楼 | 信息 | 搜索 | 邮箱 | 主页 | UC


加好友 发短信
等级:版主 帖子:85326 积分:427815 威望:0 精华:5 注册:2012/10/18 22:13:00
  发帖心情 Post By:2018/4/17 16:20:00 [显示全部帖子]

msgbox(e.FileName)

If e.FileName.Length < 4+user.Group.length Then

    e.cancel = true

ElseIf Left(e.FileName,4+user.group.length) <> "/公共/" & user.group Then

    e.cancel = true

End If

If e.Cancel Then
    MessageBox.Show("禁止删除" & user.group & "目录下的内容", "提示", MessageBoxButtons.OK,MessageBoxIcon.Information)
End If


 回到顶部
帅哥哟,离线,有人找我吗?
有点甜
  25楼 | 信息 | 搜索 | 邮箱 | 主页 | UC


加好友 发短信
等级:版主 帖子:85326 积分:427815 威望:0 精华:5 注册:2012/10/18 22:13:00
  发帖心情 Post By:2018/4/17 16:38:00 [显示全部帖子]

If user.group > "" Then
    If e.FileName.Length < 4+user.Group.length Then
        e.cancel = True
    ElseIf Left(e.FileName,4+user.group.length) <> "/公共/" & user.group Then
        e.cancel = True
    End If
    If e.Cancel Then
        MessageBox.Show("禁止删除" & user.group & "目录下的内容", "提示", MessageBoxButtons.OK,MessageBoxIcon.Information)
    End If
Else
    msgbox("没有设置分组group")
End If


 回到顶部
总数 26 上一页 1 2 3