• Browse Blogs
  • My Blog
  • My Updates

+Tags Get help with tags?

  • View as cloud  | list

+ Similar Entries

photo

Bringing The Power O...

Blog:  Beyond The Ye...
Peter Presnell
Updated 
No RatingsRatings 0     No CommentsComments 0
photo

Adding the "X" Facto...

Blog:  Beyond The Ye...
Peter Presnell
Updated 
No RatingsRatings 0     CommentsComments 2
photo

Tagging Design Eleme...

Blog:  Beyond The Ye...
Peter Presnell
Updated 
No RatingsRatings 0     CommentsComments 1
photo

Add Discussion Threa...

Blog:  Beyond The Ye...
Peter Presnell
Updated 
No RatingsRatings 0     CommentsComments 2
photo

New Video Includes S...

Blog:  Beyond The Ye...
Peter Presnell
Updated 
No RatingsRatings 0     No CommentsComments 0

+ Bookmarks

+ Blog Authors  

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

Comments (0)

There are no comments to display Add a Comment Add a Comment

Previous |  Main  | Next
Skip to main content link. Accesskey S
IBM Lotus Connections Help Tools About