EDMI: Add GetAccessRight, Add Init Jobs for EDMIService
This commit is contained in:
@@ -151,6 +151,22 @@ Public Class Client
|
||||
End Try
|
||||
End Function
|
||||
|
||||
Public Async Function GetAccessRightAsync(UserId As Long, ObjectId As Long) As Task(Of Rights.AccessRight)
|
||||
Try
|
||||
Dim oResponse As AccessRightResult = Await _channel.GetAccessRightAsync(UserId, ObjectId)
|
||||
|
||||
If oResponse.OK Then
|
||||
Return oResponse.Right
|
||||
Else
|
||||
_logger.Warn("Rights from server could not be fetched for UserId [{0}] on Object [{1}]. Returning default Right View", UserId, ObjectId)
|
||||
Return Rights.AccessRight.VIEW_ONLY
|
||||
End If
|
||||
Catch ex As Exception
|
||||
_logger.Error(ex)
|
||||
Throw ex
|
||||
End Try
|
||||
End Function
|
||||
|
||||
''' <summary>
|
||||
''' Aborts the channel and creates a new connection
|
||||
''' </summary>
|
||||
|
||||
Reference in New Issue
Block a user