MS25.10
This commit is contained in:
@@ -2152,27 +2152,33 @@ Public Class ClassWindream
|
||||
|
||||
Dim oWMObject As WINDREAMLib.WMObject
|
||||
oWMObject = oSession.GetWMObjectByPath(WMEntityDocumentAndMap, filepath.Substring(2))
|
||||
Dim AccessRightsObject
|
||||
AccessRightsObject = oWMObject.GetWMObjectRelationByName(REL_Document_AccessRight)
|
||||
Dim _msg As String
|
||||
For Each aRightRelation In AccessRightsObject
|
||||
dwAccessRight = aRightRelation.GetVariableValue(COL_AccessRight_AccessRight) 'COL_AccessRight_AccessRight)
|
||||
Dim UserGroupRelation = aRightRelation.GetWMObjectRelationByName(REL_AccessRight_UserOrGroup)
|
||||
Dim UserOrGroup = UserGroupRelation.item(0).aName
|
||||
If UserOrGroup.ToString.ToLower.Contains(Environment.UserName.ToLower) Then
|
||||
If dwAccessRight And WMAccessRightRead Then
|
||||
_msg = "R"
|
||||
If Not IsNothing(oWMObject) Then
|
||||
Dim AccessRightsObject
|
||||
AccessRightsObject = oWMObject.GetWMObjectRelationByName(REL_Document_AccessRight)
|
||||
Dim _msg As String
|
||||
For Each aRightRelation In AccessRightsObject
|
||||
dwAccessRight = aRightRelation.GetVariableValue(COL_AccessRight_AccessRight) 'COL_AccessRight_AccessRight)
|
||||
Dim UserGroupRelation = aRightRelation.GetWMObjectRelationByName(REL_AccessRight_UserOrGroup)
|
||||
Dim UserOrGroup = UserGroupRelation.item(0).aName
|
||||
If UserOrGroup.ToString.ToLower.Contains(Environment.UserName.ToLower) Then
|
||||
If dwAccessRight And WMAccessRightRead Then
|
||||
_msg = "R"
|
||||
End If
|
||||
If dwAccessRight And WMAccessRightWrite Then
|
||||
_msg = _msg & "W"
|
||||
End If
|
||||
If dwAccessRight And WMAccessRightAdmin Then
|
||||
_msg = _msg & "A"
|
||||
End If
|
||||
End If
|
||||
If dwAccessRight And WMAccessRightWrite Then
|
||||
_msg = _msg & "W"
|
||||
End If
|
||||
If dwAccessRight And WMAccessRightAdmin Then
|
||||
_msg = _msg & "A"
|
||||
End If
|
||||
End If
|
||||
|
||||
Next
|
||||
Return _msg
|
||||
|
||||
Next
|
||||
Return _msg
|
||||
Else
|
||||
MsgBox("Could not create a windream-object!", MsgBoxStyle.Exclamation)
|
||||
Return Nothing
|
||||
End If
|
||||
|
||||
|
||||
Catch ex As Exception
|
||||
ClassLogger.Add("Unexpected Error in Get_File_Rights: " & ex.Message)
|
||||
|
||||
Reference in New Issue
Block a user