2017-07-05 53 views
0

案例:通過服務器上的Name.nsf創建一個Web應用程序來註冊用戶。xpages使用登錄名和電子郵件向匿名用戶註冊names.nsf

用戶A

用戶B

意味着有2個相關的數據庫。

第一個數據庫:匿名(網絡)允許通過數據庫鍵入那裏的信息。

第二個數據庫:Names.nsf中

首先數據庫「完全」訪問用戶必須被允許創建的名稱NSF用戶或用戶創建了一個電子郵件地址!

問題

我是否只需要連接服務器視圖($ VIMPeopleByLastName)的names.nsf並創建這些網頁的用戶的文件?

回答

0

查看有關Directory Assistance的文檔。聽起來這將是所需的方法。

0

它一直沿,因爲我做的事情與NAB(交換,交換無處不在),但是如果我記得這是非常簡單的....此前,通過一個XPage的時候,我得到了用戶填寫用戶名和很少的細節,那麼當你提交時,調用一個lotuScript代理,並在NAB中創建該帳戶?我相信它用於檢查用戶是否已經存在,將htttpPassword字段,更改日期設置爲現在,用戶名,公司,電子郵件地址等 - 代理程序可以使用有權寫入NAB的用戶的權限運行。然後它創建帳戶,生成一個密碼,並用於通過電子郵件發送一個鏈接,然後用戶可以設置自己的密碼

0

我找到了使用Notes代理的解決方案來更新它。我不確定xpages javascript的寫作方式。下面是我使用NotesRegistration的腳本:RegisterNewUser

Option Public 
Option Declare 

Sub Initialize 
' this agent use on [register] button locate on [request form] xpages 

Dim s As New NotesSession, db As NotesDatabase, a As NotesAgent 
Dim doc As NotesDocument 
Set db = s.Currentdatabase 
Set a = s.Currentagent 
Set doc = s.Documentcontext  ' uidoc 

Dim certid As String 'full path of cert id 
Dim certpasswd As String 
Dim OU As String 
Dim lastname As String 
Dim firstname As String 
Dim middleinit As String 
Dim usrIdpath As String 
Dim mailsvr As String 
Dim mailfile As String 
Dim userpasswd As String 
Dim internetpath As String 

Dim depvw As NotesView, depdoc As NotesDocument 
Set depvw = db.Getview("Department sort by dept") 
Set depdoc = depvw.Getdocumentbykey(doc.Dept(0), True) 
If Not depdoc Is Nothing Then 
    certid = depdoc.IdPath(0)          ' full path of cert id 
    certpasswd = depdoc.IdPassword(0)        ' Cert id password(password) 
    OU = depdoc.Dept(0)            ' Application (department to register) 
    lastname= doc.SelectMail(0)          ' current document selected mail (person) 
    firstname = ""  '           [din't used] 
    middleinit = ""             ' [din't used] 
    usrIdpath = depdoc.DptIdStor(0) +doc.SelectMail(0)+ ".id"  ' user path 
    mailsvr = depdoc.MailSvr(0)          ' mail svr 
    mailfile = depdoc.MailLocation(0)+doc.SelectMail(0)    ' Mail\person 
    userpasswd= depdoc.UserPassword(0)        ' User password 
    internetpath = doc.SelectMail(0)+depdoc.InternetPath(0)   ' mail address 

End If 

Dim reg As New NotesRegistration 
Dim dt As Variant 
dt = DateNumber(Year(Today)+1, Month(Today), Day(Today)) 

reg.RegistrationServer = mailsvr  '"CN=ServerOne/O=dev" 
reg.CreateMailDb = True     ' 
reg.CertifierIDFile = certid   '"C:\IBM\Domino\data\office.id" 
reg.Expiration = dt 
reg.IDType = ID_HIERARCHICAL 
reg.MinPasswordLength = 1    ' password strength 
reg.IsNorthAmerican = True 
reg.OrgUnit = OU      '"Application" 
reg.RegistrationLog = "log.nsf" 
reg.UpdateAddressBook = True 
reg.StoreIDInAddressBook = True 
reg.MailInternetAddress = internetpath '"[email protected]" 


Call reg.RegisterNewUser(lastname, _ ' last name 
usridpath, _       '"C:\IBM\Domino\data\ +name+.id" ' file to be created 
mailsvr, _        '"CN=ServerOne/O=dev"    ' mail server 
firstname, _       '         ' first name 
middleInit, _       '         ' middle initial 
certpasswd, _       '"office"       ' certifier password 
"", _         ' location field 
"", _         ' comment field 
mailfile, _        '"mail\person.nsf"     ' mail file 
"", _         ' Forwarding domain 
userpasswd, _       '"password", _     ' user password 
NOTES_DESKTOP_CLIENT)     ' user type 


End Sub 
+0

如果用戶只需要通過網絡訪問,使用註冊類是過來殺掉,因爲它創建用途爲Notes用戶ID爲文件等網絡用戶不會除非他們是iNotes用戶也是如此。 – Newbs

+0

是的,當他們回到辦公室使用他們的筆記客戶端時,他們是筆記用戶。 –

相關問題