DataWeb
Search Results for

    Show / Hide Table of Contents

    Interface IPermissionRuleStore

    Defines a store for retrieving permission rule filters based on user roles.

    Namespace: DataWeb.Authorization
    Assembly: DataWeb.Core.dll
    Syntax
    public interface IPermissionRuleStore
    Remarks

    This interface provides data access layer functionality for permission rules. It generates visibility filters for different contexts (list views vs. user-specific views) based on the user's assigned roles. Implementations typically query a rules database or configuration store to determine what data a user can access.

    Properties

    Name

    Gets the name of the permission rule store.

    Declaration
    string Name { get; }
    Property Value
    Type Description
    string

    Methods

    GetListVisibleFilter(string, List<string>)

    Retrieves a filter expression for a list view based on the specified table name and user roles.

    Declaration
    string GetListVisibleFilter(string tableName, List<string> userRoles)
    Parameters
    Type Name Description
    string tableName

    The name of the table for which the filter is being requested.

    List<string> userRoles

    A collection of the user's role identifiers that determine permission rules.

    Returns
    Type Description
    string

    A filter expression string compatible with the data store (e.g., SQL or LINQ format). An empty string indicates no filtering (user can access all records). Returns null if the table is not recognized.

    Remarks

    This method is used for "list view" contexts where users browse records in a table. The filter restricts which records are visible based on the user's roles and associated permission rules.

    GetUserVisibleFilter(string, List<string>)

    Retrieves a filter expression for a user view based on the specified table name and user roles.

    Declaration
    string GetUserVisibleFilter(string tableName, List<string> userRoles)
    Parameters
    Type Name Description
    string tableName

    The name of the table for which the filter is being requested.

    List<string> userRoles

    A collection of the user's role identifiers that determine permission rules.

    Returns
    Type Description
    string

    A filter expression string compatible with the data store (e.g., SQL or LINQ format). An empty string indicates no filtering (user can access all records). Returns null if the table is not recognized.

    Remarks

    This method is used for "user view" contexts where data is presented from a user-centric perspective. The filter may differ from GetListVisibleFilter(string, List<string>) based on the specific business rules for user views.

    In this article
    Back to top Generated by DocFX