Egyszerű dokumentumvédelem:
Tanulmány #1:
Sub Queryopen(Source As Notesuidocument, Mode As Integer, Isnewdoc As Variant, Continue As Variant)
'
' Document controller via ROLEs for GIZMOs
' design for CSIZMADIA Laszlo ONLY
'
Version = "1.0"
'
' Designed by FleXoft
' Written by FleXoft
' (mailto:GFleischmann@yahoo.com or Flex@flexoft.dyndns.org)
'
' v1.0 +2001/07/31 Buda
' Rls: First release
'
' I'm planning todo:
' ---------------------
'
' Known bugs:
' ------------------
' - You'll get a message if you don't have default role: [All]
' - This version doesn't take care about groups (for example: -Default- and the others)
'
If IsNewDoc = True Then
' No role checking needed
Exit Sub
End If
Dim session As New NotesSession
Dim acl As NotesACL
Dim entry As NotesACLEntry
Set db = session.CurrentDatabase
Set acl = db.ACL
Set entry = acl.GetEntry( session.CommonUserName )
If entry Is Nothing Then
Set entry = acl.GetEntry( session.UserName )
End If
If entry Is Nothing Then
Messagebox "No entry for " & session.CommonUserName & " or " & session.UserName,, "No entry"
Exit Sub
End If
If entry.IsRoleEnabled( "[All]" ) Then
' Approved for Superusers
Continue = True
Exit Sub
Else
' Checking Engine
Forall x In Source.document.Whatsaboutshort
Forall y In acl.Roles
If "[" & Ucase( x ) & "]" = Ucase( y ) Then
If entry.IsRoleEnabled( y ) Then
' Approved
Continue = True
Exit Sub
Else
' Not approved
Continue = False
End If
End If
End Forall
End Forall
End If
' No matching => Not approved
Continue=False
End Sub
Korrekt beállítások téli/nyári időszámitás átváltáshoz:
ZONE_SET=0
TIMEZONE=-1
DST=1
DSTLaw=3 -1 1 10 -1 1
http://www.keysolutions.com/NotesFAQ/howquoted.html
©
FLEISCHMANN György - |