98 lines
2.9 KiB
VB.net
98 lines
2.9 KiB
VB.net
Imports System
|
|
Imports System.ComponentModel
|
|
|
|
Imports DevExpress.Xpo
|
|
Imports DevExpress.Data.Filtering
|
|
|
|
Imports DevExpress.ExpressApp
|
|
Imports DevExpress.Persistent.Base
|
|
Imports DevExpress.Persistent.BaseImpl
|
|
Imports DevExpress.Persistent.Validation
|
|
Public Enum ePermissionType
|
|
Allow = 1
|
|
Deny = 0
|
|
NotSet = -1
|
|
End Enum
|
|
<DefaultClassOptions()> _
|
|
<NavigationItem("Default")> _
|
|
Public Class PermissionMatrix
|
|
Inherits BaseObject
|
|
Private _Role As Role
|
|
Private _ObjectType As String
|
|
Private _IsCreate As ePermissionType = -1
|
|
Private _IsDelete As ePermissionType = -1
|
|
Private _IsWrite As ePermissionType = -1
|
|
Private _IsRead As ePermissionType = -1
|
|
Private _IsNavigate As ePermissionType = -1
|
|
Public Sub New(ByVal session As Session)
|
|
MyBase.New(session)
|
|
' This constructor is used when an object is loaded from a persistent storage.
|
|
' Do not place any code here or place it only when the IsLoading property is false:
|
|
' if (!IsLoading){
|
|
' It is now OK to place your initialization code here.
|
|
' }
|
|
' or as an alternative, move your initialization code into the AfterConstruction method.
|
|
End Sub
|
|
Public Overrides Sub AfterConstruction()
|
|
MyBase.AfterConstruction()
|
|
' Place here your initialization code.
|
|
End Sub
|
|
Property Role As Role
|
|
Get
|
|
Return _Role
|
|
End Get
|
|
Set(ByVal value As Role)
|
|
SetPropertyValue("Role", _Role, value)
|
|
End Set
|
|
End Property
|
|
<Size(255)> _
|
|
Property ObjectType As String
|
|
Get
|
|
Return _ObjectType
|
|
End Get
|
|
Set(ByVal value As String)
|
|
SetPropertyValue("ObjectType", _ObjectType, value)
|
|
End Set
|
|
End Property
|
|
Property IsCreate As ePermissionType
|
|
Get
|
|
Return _IsCreate
|
|
End Get
|
|
Set(ByVal value As ePermissionType)
|
|
SetPropertyValue("IsCreate", _IsCreate, value)
|
|
End Set
|
|
End Property
|
|
Property IsDelete As ePermissionType
|
|
Get
|
|
Return _IsDelete
|
|
End Get
|
|
Set(ByVal value As ePermissionType)
|
|
SetPropertyValue("IsDelete", _IsDelete, value)
|
|
End Set
|
|
End Property
|
|
Property IsWrite As ePermissionType
|
|
Get
|
|
Return _IsWrite
|
|
End Get
|
|
Set(ByVal value As ePermissionType)
|
|
SetPropertyValue("IsWrite", _IsWrite, value)
|
|
End Set
|
|
End Property
|
|
Property IsRead As ePermissionType
|
|
Get
|
|
Return _IsRead
|
|
End Get
|
|
Set(ByVal value As ePermissionType)
|
|
SetPropertyValue("IsRead", _IsRead, value)
|
|
End Set
|
|
End Property
|
|
Property IsNavigate As ePermissionType
|
|
Get
|
|
Return _IsNavigate
|
|
End Get
|
|
Set(ByVal value As ePermissionType)
|
|
SetPropertyValue("IsNavigate", _IsNavigate, value)
|
|
End Set
|
|
End Property
|
|
End Class
|