F
fvoice
хотел использовать @Authors, но эта функция не возвращает конкатенированного списка полей Authors..
какие еще способы есть?
какие еще способы есть?
Forall x in doc.Items
if x.Type = AUTHORS then
'собираем авторов в array/list
end if
End forall
'Проверяем текущего юзера на наличие в array/list
Function MyIsEditor(doc As NotesDocument ) As Boolean
Dim ws As New NotesUIWorkspace
Dim Authors As Variant
Dim UserNamesList As Variant
Dim i As Integer
Dim j As Integer
If ws.CurrentDatabase.Database.CurrentAccessLevel >3 Then
MyIsEditor = True
Exit Function
End If
UserNamesList = Evaluate({@UserNamesList},doc)
Authors = doc.Authors
Forall item In doc.Items
If item.IsAuthors Then
Authors = Fulltrim(Arrayunique(Arrayappend(Authors,item.Values)))
End If
End Forall
For i = 0 To Ubound(Authors)
For j = 0 To Ubound(UserNamesList)
If Authors(i) = UsernamesList(j) Then
MyIsEditor = True
Exit Function
End If
Next
Next
MyIsEditor = False
End Function
This property does not return the names of people who have permission to edit a document (as found in an item of type Authors). Therefore, the people returned by the Authors property and the people listed in an Authors item may differ.
Forall item In doc.Items
If item.IsAuthors Then
Authors = item.Values
Authors = Fulltrim(Arrayunique(Arrayappend(Authors,item.Values)))
End If
End Forall
Forall item In doc.Items
If item.IsAuthors Then
Forall value In item.values
If Not value = "" Then
Redim Preserve Authors(Ubound(Authors)+1)
Authors(Ubound(Authors)-1) = value
End If
End Forall
End If
End Forall
Обучение наступательной кибербезопасности в игровой форме. Начать игру!