Blogs

  • Browse Blogs
  • My Blog
  • My Updates

Tags Help

  • View as cloud  | list

Similar Blogs

photo

Yellow is the...

55 Entries |  Tim Tripcony
Updated 
No Ratings 0     Comments 22
photo

TexasSwede

66 Entries |  Karl-Henry Martinsso...
Updated 
No Ratings 0     Comments 59
photo

Lotus Nut

69 Entries |  Chris Whisonant
Updated 
Ratings 4     Comments 96
photo

Urs Meli

19 Entries |  Urs Meli
Updated 
No Ratings 0     Comments 14
photo

Uh Clem's Adm...

35 Entries |  Chris Mobley
Updated 
Ratings 5     Comments 42

Dogear Bookmarks

.Domino Framework

Blog Authors:  Peter Presnell  

All entries tagged with roles

DominoDatabase.HasRole Property

Peter Presnell  |     |  Tags:  .dominoframework roles  |  Comments (0)

One of the things I find I am often doing in creating business logic for an application is determining if the curtrent user has a specific role.  I have just added the following HasRoles property to the DominoDatabase class inside the .DOmino Framework as a way of quickly if a user has a specific role:-

'/** ' * Determine if specific user has a particular role for this database ' */ Property Get HasRole(pUserName As Variant,pRole As String) As Boolean Dim Username As String Dim UserRoles As Variant Try: On Error Goto Catch If(iDB Is Nothing) Then Exit Property Select Case Typename(pUsername) Case "STRING" If (pUserName = "") Then UserName$ = Session.UserName$ Else UserName$ = Cstr(pUserName) Case "NOTESITEM" UserName = Cstr(pUserName.Values(0)) Case Else UserName$ = Session.UserName$ End Select UserRoles = iDB.QueryAccessRoles(UserName$) Forall UserRole In UserRoles If Cstr(UserRole) = pRole Then HasRole = True Exit Property End If End Forall HasRole = False Exit Property Catch: Stop Call ReportError() Exit Property End Property

Skip to main content link. Accesskey S
IBM Lotus Connections Help Tools About

Tags

A tag is a keyword that is used to categorize an entry. To view the entries with a particular tag, click a tag name or enter a tag in the box.
The tag cloud indicates the frequency of tag use. Popular tags appear darkest. The slider control adjusts how many tags are displayed in the tag cloud.