如何授予 public 对 lotus domino 中 webcontent 下文件的访问权限

How to give public access to files under webcontent in lotus domino

我有一个带有 XPage 的多米诺应用程序,我想成为 public。因此,我在 ACL 中将 "Default" 设置为 Depositor level with read public documents 选项,以使其成为 public.

当我想使用图像资源时,我会转到其属性安全选项卡并启用 "available to public access users" 复选框。

现在,我想在我的应用程序中使用 font-awesome,我在 webcontent 文件夹下有 font-awesome 的文件夹及其子文件夹和文件。

如何制作它们 public? (在非 public 应用程序中,font-awesome 可以正常使用 webcontent 文件夹下的 font-awesome 文件夹)

他们仍然在 NSF 中注册为设计说明(这就是他们选择默认可见性的原因),所以我认为唯一真正的选择是 运行 一个代理来更新他们的可见性,明确地。 Sven Hasselbach 写了一篇关于 this topic a couple times 的博客(至少是关于以编程方式与 WebContent 文件夹中的项目进行交互)并且值得一读。最终,我尝试将这些 public 不可知的公共资源放入我的 Domino /Data/domino/html/ 路径中,以便始终 public (该路径始终 public 可见),并且可以在主题中设置。

[更新] 有关详细信息,请参阅在 Q 的评论中发布的 link Per Henrik Lausten。 [/更新]

我只是创建了一个代理来设置标志。您可以在下方获取代码。我将它用于已添加到 NSF 的 Angular 应用程序。

HTH /约翰

编辑: 代码直接插入此处:

Option Public
Option DeclareSub Initialize
Const APP_DIR = “app/”
Const FN_PUBLICACCESS = “$PublicAccess”
Const FLAG_TRUE = “1”
Dim sess As New NotesSession
Dim db As NotesDatabase
Dim nc As NotesNoteCollection
Set db = sess.currentDatabase
Set nc = db.CreateNoteCollection(False)
Call nc.SelectAllDesignElements(True)
Call nc.BuildCollection
Dim d1 As Long
Dim d2 As Long
Dim title As String
Dim flagsExt As String
Dim noteid As String
Dim nextid As String
Dim i As Long
Dim doc As NotesDocument
noteid = nc.Getfirstnoteid()
For i = 1 To nc.Count
‘get the next note ID before removing any notes
nextid = nc.GetNextNoteId(noteid)
Set doc = db.GetDocumentByID(noteid)
title = doc.GetItemValue(“$title”)(0)
flagsExt = doc.GetItemValue(“$flagsExt”)(0)
If LCase(flagsExt) = “w” And Left(LCase(title),Len(APP_DIR)) = LCase(APP_DIR) Then
d1 = d1 + 1
If Not doc.Getitemvalue(FN_PUBLICACCESS)(0) = FLAG_TRUE Then
d2 = d2 + 1
Call  doc.replaceItemValue(FN_PUBLICACCESS,FLAG_TRUE)
Call doc.save(True, False)
Print title & ” – set to allow public access read”
End If
End If
noteid = nextid
Next

Print nc.count & ” design elements checked. “ & d1 & ” elements found in ‘” & APP_DIR & “‘ and “ & d2 & ” updated to give public access”

End Sub