Search Results for

    Show / Hide Table of Contents

    Class BaseEntityWithPermissions

    Every entity that requires its own permissions must implement IBaseEntityWithPermissions

    You don't have to inherit from this class necessarily, you can implement your own base class

    This does contain some static helper functions for working with permissions

    Inheritance
    object
    BaseEntity
    BaseEntityWithPermissions
    AccountMaintenance
    Role
    Team
    User
    Canvas
    Favourite
    Folder
    Grouping
    RecentItem
    Safe
    DataMapping
    DataSourceType
    ImportDefinition
    Reconciliation
    AddInModule
    Algorithm
    AlgorithmRun
    CodeSnippet
    CustomCommand
    CustomGrid
    CustomImage
    CustomList
    CustomLookupQuery
    CustomObject
    CustomObjectData
    CustomTree
    CustomValidation
    CustomView
    DefaultObject
    DefaultValue
    Layout
    ObfuscatedField
    ChartOfAccount
    GLAccount
    GLClassification
    GLRollup
    Ledger
    PeriodEnd
    PeriodEndTransformation
    Company
    CompanyStructure
    Domicile
    EntityAccount
    EntitySet
    HolidayType
    Industry
    ObjectEntity
    ObjectEntityType
    Person
    CollateralType
    CoverageType
    Currency
    ExchangeRateCategory
    Instrument
    InstrumentSet
    InstrumentSetType
    LoanInfo
    RateType
    AllocationMapping
    AllocationMethod
    AllocationPath
    AllocationRule
    BlendTransaction
    BlendingTransaction
    GroupedTransaction
    SplitTransaction
    StepChange
    Transaction
    TransactionAggregator
    TransactionAssociation
    TransactionCode
    TransactionCodeTransactionCodeGrouping
    TransactionLink
    TransactionMatcher
    TransactionType
    Transfer
    QuestionType
    Chart
    DataTemplate
    Dataset
    DatasetShortcut
    DevExpressReport
    ExpressReport
    Pivot
    QueryRunner
    Report
    SQLAssembly
    SQLWrapper
    SSRSReport
    VennSet
    SchemaEntityType
    SchemaEntityTypeField
    SchemaVersion
    ServerTask
    ActionTrigger
    ActionTriggerGate
    Article
    Comment
    Document
    ItemTask
    ItemTaskType
    Tag
    WatcherNotification
    WatcherNotificationListener
    WatcherType
    APIConnection
    Implements
    IBaseEntityWithPermissions
    IBaseEntity
    IEquatable<IBaseEntity>
    INotifyPropertyChanged
    INotifyPropertyChanging
    ICloneableAsync
    ICanTrackProperties
    Inherited Members
    BaseEntity.HISTORY_ENDROWUPDATE_COLNAME
    BaseEntity.HasTrackedPropertyChanged(string)
    BaseEntity.OriginalTrackedPropertyValue(string)
    BaseEntity.OriginalTrackedPropertyValue<T>(string)
    BaseEntity.ClearTrackedOriginalValues()
    BaseEntity.GetAllOriginalTrackedPropertyValues()
    BaseEntity.GetLabel(string)
    BaseEntity.SetLabel(string, string)
    BaseEntity.SetSilentLabel(string, string)
    BaseEntity.ResetChangedTrackedPropertiesToOriginalValues()
    BaseEntity.AddTrackedOriginalValue(string, object)
    BaseEntity.SnapshotProperties()
    BaseEntity.RestoreFromSnapshot(Dictionary<string, object>)
    BaseEntity.IsBasePropertyName(string)
    BaseEntity.IsBaseRelationshipID(string)
    BaseEntity.OnPropertyChanging(string)
    BaseEntity.OnPropertyChanged(string)
    BaseEntity.Equals(IBaseEntity)
    BaseEntity.GetHashCode()
    BaseEntity.Equals(object)
    BaseEntity.CopyFromEntity(IBaseEntity)
    BaseEntity.Clone(object)
    BaseEntity.CopyFromSource(object)
    BaseEntity.TrackChanges
    BaseEntity.ModifiedByUserID_Label
    BaseEntity.ModifiedByUserID_Label_Silent
    BaseEntity.CanvasID_Label
    BaseEntity.CanvasID_Label_Silent
    BaseEntity.AlgorithmStepID_Label
    BaseEntity.AlgorithmStepID_Label_Silent
    BaseEntity.SafeID_Label
    BaseEntity.SafeID_Label_Silent
    BaseEntity.AccountID
    BaseEntity.ID
    BaseEntity.LastUpdated
    BaseEntity.ModifiedByUserID
    BaseEntity.CanvasID
    BaseEntity.AlgorithmStepID
    BaseEntity.SafeID
    BaseEntity.PropertyChanged
    BaseEntity.PropertyChanging
    object.GetType()
    object.MemberwiseClone()
    object.ToString()
    object.Equals(object, object)
    object.ReferenceEquals(object, object)
    Namespace: LemonEdge.API.Entities
    Assembly: LemonEdge.API.dll
    Syntax
    [DataContract]
    public abstract class BaseEntityWithPermissions : BaseEntity, IBaseEntityWithPermissions, IBaseEntity, IEquatable<IBaseEntity>, INotifyPropertyChanged, INotifyPropertyChanging, ICloneableAsync, ICanTrackProperties

    Constructors

    BaseEntityWithPermissions()

    Declaration
    protected BaseEntityWithPermissions()

    Methods

    CanChangeItemPermissions(object, IEntityRetriever, IReadOnlyCache, Guid)

    Returns a task that indicates if the specifed team has permissions to change permissions for the specified item

    This works by first checking if the item itself inherits from IBaseEntityWithPermissions. If it does it checks if the item has an individual permission for the team, or the general permissions for the item type as a whole and then ensures they have permissions to change permissions.

    If the item does not inherit IBaseEntityWithPermissions then it recursively checks relationships that are marked as inheriting permissions to ensure all those items have the required permissions

    Otherwise the item is not permissioned by lemonedge and is just assumed to have full access

    Declaration
    public static Task<bool> CanChangeItemPermissions(object item, IEntityRetriever con, IReadOnlyCache cache, Guid teamID)
    Parameters
    Type Name Description
    object item

    The item to check if the team has permissions to change permissions

    IEntityRetriever con

    A context to use to check for permissions if needed

    IReadOnlyCache cache

    The local cache to check cached permissions of if required

    Guid teamID

    The team to check permissions of

    Returns
    Type Description
    Task<bool>

    A task that indicates if the specifed team has permissions to change permissions for the specified item

    CanDeleteItem(object, IEntityRetriever, IReadOnlyCache, Guid)

    Returns a task that indicates if the specifed team has permissions to delete the specified item

    This works by first checking if the item itself inherits from IBaseEntityWithPermissions. If it does it checks if the item has an individual permission for the team, or the general permissions for the item type as a whole and then ensures they are delete or greater.

    If the item does not inherit IBaseEntityWithPermissions then it recursively checks relationships that are marked as inheriting permissions to ensure all those items have the required permissions

    Otherwise the item is not permissioned by lemonedge and is just assumed to have full access

    Declaration
    public static Task<bool> CanDeleteItem(object item, IEntityRetriever con, IReadOnlyCache cache, Guid teamID)
    Parameters
    Type Name Description
    object item

    The item to check if the team has permissions to delete

    IEntityRetriever con

    A context to use to check for permissions if needed

    IReadOnlyCache cache

    The local cache to check cached permissions of if required

    Guid teamID

    The team to check permissions of

    Returns
    Type Description
    Task<bool>

    A task that indicates if the specifed team has permissions to delete the specified item

    CanWriteItem(object, IEntityRetriever, IReadOnlyCache, Guid)

    Returns a task that indicates if the specifed team has permissions to edit the specified item

    This works by first checking if the item itself inherits from IBaseEntityWithPermissions. If it does it checks if the item has an individual permission for the team, or the general permissions for the item type as a whole and then ensures they are read-write or greater.

    If the item does not inherit IBaseEntityWithPermissions then it recursively checks relationships that are marked as inheriting permissions to ensure all those items have the required permissions

    Otherwise the item is not permissioned by lemonedge and is just assumed to have full access

    Declaration
    public static Task<bool> CanWriteItem(object item, IEntityRetriever con, IReadOnlyCache cache, Guid teamID)
    Parameters
    Type Name Description
    object item

    The item to check if the team has permissions to edit

    IEntityRetriever con

    A context to use to check for permissions if needed

    IReadOnlyCache cache

    The local cache to check cached permissions of if required

    Guid teamID

    The team to check permissions of

    Returns
    Type Description
    Task<bool>

    A task that indicates if the specifed team has permissions to edit the specified item

    IsLocked(object)

    Indicates if this item implements ICanBeLocked and is set to Locked

    Declaration
    public static bool IsLocked(object item)
    Parameters
    Type Name Description
    object item

    An item to check to see if it is locked

    Returns
    Type Description
    bool

    True if this item implements ICanBeLocked and is set to Locked

    PreLoadPermissions<T>(IEnumerable<T>, IEntityRetriever, IReadOnlyCache, Guid)

    Declaration
    public static Task PreLoadPermissions<T>(IEnumerable<T> items, IEntityRetriever con, IReadOnlyCache cache, Guid teamID) where T : IBaseEntityWithPermissions
    Parameters
    Type Name Description
    IEnumerable<T> items
    IEntityRetriever con
    IReadOnlyCache cache
    Guid teamID
    Returns
    Type Description
    Task
    Type Parameters
    Name Description
    T

    Implements

    IBaseEntityWithPermissions
    IBaseEntity
    IEquatable<T>
    INotifyPropertyChanged
    INotifyPropertyChanging
    ICloneableAsync
    ICanTrackProperties

    Extension Methods

    LinqExtensions.AsArray<T>(T)
    LinqExtensions.ToArrayOfOne<T>(T)
    LinqExtensions.ToListOfOne<T>(T)
    MiscExtensions.SetIfNotEqual<T, TP>(T, Expression<Func<T, TP>>, TP)
    WeakReferenceExtensions.WeakReference(object)
    SQLExtensions.ToSQLValue(object, bool)
    ReflectionExtensions.ClearEventInvocations(object, string)
    StringExtensions.ToCSVFormatString(object, Type)

    See Also

    IBaseEntityWithPermissions
    In this article
    Back to top © LemonEdge Technologies. All rights reserved.