Class RuleList
Represents a list of permission rules and provides methods to evaluate them. Implements the IPermissionRule interface.
Implements
Inherited Members
Namespace: DataWeb.Authorization.PermissionRules
Assembly: DataWeb.Core.dll
Syntax
public sealed class RuleList : IPermissionRule
Remarks
Initializes a new instance of the RuleList class with a PermissionSet and a service provider.
Constructors
RuleList(PermissionSet, IServiceProvider)
Represents a list of permission rules and provides methods to evaluate them. Implements the IPermissionRule interface.
Declaration
public RuleList(PermissionSet permissionSet, IServiceProvider serviceProvider)
Parameters
Type | Name | Description |
---|---|---|
PermissionSet | permissionSet | |
IServiceProvider | serviceProvider |
Remarks
Initializes a new instance of the RuleList class with a PermissionSet and a service provider.
Methods
GetIsVisibleFilter(string)
Retrieves a filter expression based on the visibility rules for the specified table.
Declaration
public string GetIsVisibleFilter(string tableName)
Parameters
Type | Name | Description |
---|---|---|
string | tableName | The name of the table for which the filter is being requested. |
Returns
Type | Description |
---|---|
string | A filter expression string for the specified table. |
IsWriteAsync(NavigationContext, ContextItem)
Determines if the current user has write permissions for the specified context item.
Declaration
public Task<bool> IsWriteAsync(NavigationContext navigationContext, ContextItem contextItem)
Parameters
Type | Name | Description |
---|---|---|
NavigationContext | navigationContext | The NavigationContext containing information about the current navigation request. |
ContextItem | contextItem |
Returns
Type | Description |
---|---|
Task<bool> | A task that represents the asynchronous operation, returning true if the user has write permissions, false otherwise. |