• Browse Blogs
  • My Blog
  • My Updates

+Tags Get help with tags?

  • View as cloud  | list

+ Similar Blogs

photo

Yellow is the...

72 Entries |  Tim Tripcony
Updated 
RatingsRatings 2     CommentsComments 34
photo

Lotus Nut

111 Entries |  Chris Whisonant
Updated 
RatingsRatings 23     CommentsComments 157
photo

Patrick Picar...

62 Entries |  Patrick Picard
Updated 
RatingsRatings 2     CommentsComments 112
photo

Urs Meli

42 Entries |  Urs Meli
Updated 
No RatingsRatings 0     CommentsComments 48
photo

TexasSwede

109 Entries |  Karl-Henry Martinsso...
Updated 
No RatingsRatings 0     CommentsComments 94

+ Bookmarks

+ Blog Authors  

All entries tagged with roles

1 - 1 of 1
  • Previous
  • Next
  • Page   1

DominoDatabase.HasRole Property

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

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
No RatingsRatings 0

  • Previous
  • Next
Jump to page of 1
Skip to main content link. Accesskey S
IBM Lotus Connections Help Tools About