components.PowerPortalsPro.Demo.Client.Customizations.Pages.GettingStarted.SecurityPage.title
components.PowerPortalsPro.Demo.Client.Customizations.Pages.GettingStarted.SecurityPage.description
components.PowerPortalsPro.Demo.Client.Customizations.Pages.GettingStarted.SecurityPage.overview-title
components.PowerPortalsPro.Demo.Client.Customizations.Pages.GettingStarted.SecurityPage.overview-description
- components.PowerPortalsPro.Demo.Client.Customizations.Pages.GettingStarted.SecurityPage.overview-table-handler
- components.PowerPortalsPro.Demo.Client.Customizations.Pages.GettingStarted.SecurityPage.overview-record-handler
components.PowerPortalsPro.Demo.Client.Customizations.Pages.GettingStarted.SecurityPage.tip-label
components.PowerPortalsPro.Demo.Client.Customizations.Pages.GettingStarted.SecurityPage.overview-tip
components.PowerPortalsPro.Demo.Client.Customizations.Pages.GettingStarted.SecurityPage.getting-started-title
components.PowerPortalsPro.Demo.Client.Customizations.Pages.GettingStarted.SecurityPage.step1-title
components.PowerPortalsPro.Demo.Client.Customizations.Pages.GettingStarted.SecurityPage.step1-description
components.PowerPortalsPro.Demo.Client.Customizations.Pages.GettingStarted.SecurityPage.step1-example-intro
public class MyTablePermissionHandler : ITablePermissionHandler
{
public string Table => "my_customtable";
public Task<bool> CanCreateAsync(Guid? userId) => Task.FromResult(true);
public Task<bool> CanReadAsync(Guid? userId) => Task.FromResult(true);
public Task<bool> CanUpdateAsync(Guid? userId) => Task.FromResult(true);
public Task<bool> CanDeleteAsync(Guid? userId) => Task.FromResult(true);
public Task<bool> CanAppendAsync(Guid? userId) => Task.FromResult(true);
public Task<bool> CanAppendToAsync(Guid? userId) => Task.FromResult(true);
}
components.PowerPortalsPro.Demo.Client.Customizations.Pages.GettingStarted.SecurityPage.step2-title
components.PowerPortalsPro.Demo.Client.Customizations.Pages.GettingStarted.SecurityPage.step2-description
builder.Services.AddSingleton<ITablePermissionHandler, MyTablePermissionHandler>();
components.PowerPortalsPro.Demo.Client.Customizations.Pages.GettingStarted.SecurityPage.step2-note
components.PowerPortalsPro.Demo.Client.Customizations.Pages.GettingStarted.SecurityPage.record-level-title
components.PowerPortalsPro.Demo.Client.Customizations.Pages.GettingStarted.SecurityPage.record-level-description
components.PowerPortalsPro.Demo.Client.Customizations.Pages.GettingStarted.SecurityPage.record-level-example-intro
public class ContactPermissionHandler : ITableRecordPermissionHandler
{
public string Table => "contact";
public List<string> RequiredColumns => [];
// components.PowerPortalsPro.Demo.Client.Customizations.Pages.GettingStarted.SecurityPage.snippet-record-level-table-comment
public Task<bool> CanReadAsync(Guid? userId) => Task.FromResult(true);
public Task<bool> CanCreateAsync(Guid? userId)
=> Task.FromResult(userId != null && userId != Guid.Empty);
// components.PowerPortalsPro.Demo.Client.Customizations.Pages.GettingStarted.SecurityPage.snippet-record-level-record-comment
public Task<bool> CanUpdateAsync(
Guid? userId, TableRecord recordWithUpdates, TableRecord currentRecord)
{
return Task.FromResult(userId == currentRecord.Id);
}
public Task<bool> CanDeleteAsync(Guid? userId, TableRecord record)
{
return Task.FromResult(userId == record.Id);
}
// components.PowerPortalsPro.Demo.Client.Customizations.Pages.GettingStarted.SecurityPage.snippet-record-level-remaining-comment
}
components.PowerPortalsPro.Demo.Client.Customizations.Pages.GettingStarted.SecurityPage.note-label
components.PowerPortalsPro.Demo.Client.Customizations.Pages.GettingStarted.SecurityPage.record-level-update-note
components.PowerPortalsPro.Demo.Client.Customizations.Pages.GettingStarted.SecurityPage.required-columns-title
components.PowerPortalsPro.Demo.Client.Customizations.Pages.GettingStarted.SecurityPage.required-columns-description
components.PowerPortalsPro.Demo.Client.Customizations.Pages.GettingStarted.SecurityPage.required-columns-example-intro
public class RegionPermissionHandler : ITableRecordPermissionHandler
{
public string Table => "ppp_region";
public List<string> RequiredColumns => ["ppp_owningportaluserid"];
public Task<bool> CanReadAsync(Guid? userId) => Task.FromResult(true);
public Task<bool> CanCreateAsync(Guid? userId) => Task.FromResult(userId != null);
public Task<bool> CanReadAsync(Guid? userId, TableRecord record)
{
return Task.FromResult(
record.GetValueOrDefault<LookupValue>("ppp_owningportaluserid")?.Value == userId);
}
// components.PowerPortalsPro.Demo.Client.Customizations.Pages.GettingStarted.SecurityPage.snippet-required-columns-remaining-comment
}
components.PowerPortalsPro.Demo.Client.Customizations.Pages.GettingStarted.SecurityPage.note-label
components.PowerPortalsPro.Demo.Client.Customizations.Pages.GettingStarted.SecurityPage.required-columns-empty-note
components.PowerPortalsPro.Demo.Client.Customizations.Pages.GettingStarted.SecurityPage.query-filter-title
components.PowerPortalsPro.Demo.Client.Customizations.Pages.GettingStarted.SecurityPage.query-filter-description
components.PowerPortalsPro.Demo.Client.Customizations.Pages.GettingStarted.SecurityPage.query-filter-extends
components.PowerPortalsPro.Demo.Client.Customizations.Pages.GettingStarted.SecurityPage.query-filter-vs-record
components.PowerPortalsPro.Demo.Client.Customizations.Pages.GettingStarted.SecurityPage.query-filter-step1-title
components.PowerPortalsPro.Demo.Client.Customizations.Pages.GettingStarted.SecurityPage.query-filter-step1-description components.PowerPortalsPro.Demo.Client.Customizations.Pages.GettingStarted.SecurityPage.query-filter-step1-link-builder
components.PowerPortalsPro.Demo.Client.Customizations.Pages.GettingStarted.SecurityPage.query-filter-step1-example-intro
public class ContactQueryFilterInterceptor : IFetchXmlQueryFilterInterceptor
{
public string Table => "contact";
public Task<bool> CanCreateAsync(Guid? userId) => Task.FromResult(false);
public Task<bool> CanReadAsync(Guid? userId) => Task.FromResult(true);
public Task<bool> CanUpdateAsync(Guid? userId) => Task.FromResult(false);
public Task<bool> CanDeleteAsync(Guid? userId) => Task.FromResult(false);
public Task<bool> CanAppendAsync(Guid? userId) => Task.FromResult(false);
public Task<bool> CanAppendToAsync(Guid? userId) => Task.FromResult(false);
public Task<FetchXMLBuilder> OnQueryAsync(
FetchXMLBuilder fetchXmlBuilder, FetchXmlParameters parameters)
{
var filter = fetchXmlBuilder.Fetch.Entity.AddFilter();
var condition = filter.AddCondition();
condition.Column = "contactid";
condition.Operator = ConditionOperator.Equal;
condition.Value = parameters.CurrentUser.Id.ToString();
return Task.FromResult(fetchXmlBuilder);
}
}
components.PowerPortalsPro.Demo.Client.Customizations.Pages.GettingStarted.SecurityPage.query-filter-step2-title
components.PowerPortalsPro.Demo.Client.Customizations.Pages.GettingStarted.SecurityPage.query-filter-step2-description
builder.Services.AddTransient<ContactQueryFilterInterceptor>();
builder.Services.AddTransient<ITablePermissionHandler>(
sp => sp.GetRequiredService<ContactQueryFilterInterceptor>());
builder.Services.AddTransient<IFetchXmlQueryFilterInterceptor>(
sp => sp.GetRequiredService<ContactQueryFilterInterceptor>());
components.PowerPortalsPro.Demo.Client.Customizations.Pages.GettingStarted.SecurityPage.tip-label
components.PowerPortalsPro.Demo.Client.Customizations.Pages.GettingStarted.SecurityPage.query-filter-tip
components.PowerPortalsPro.Demo.Client.Customizations.Pages.GettingStarted.SecurityPage.base-classes-title
components.PowerPortalsPro.Demo.Client.Customizations.Pages.GettingStarted.SecurityPage.base-classes-description
- components.PowerPortalsPro.Demo.Client.Customizations.Pages.GettingStarted.SecurityPage.base-classes-anonymous
components.PowerPortalsPro.Demo.Client.Customizations.Pages.GettingStarted.SecurityPage.api-reference-label
ITablePermissionHandler Interface
components.PowerPortalsPro.Demo.Client.Customizations.Components.Documentation.ApiDocumentation.properties
components.PowerPortalsPro.Demo.Client.Customizations.Components.Documentation.ApiDocumentation.name | components.PowerPortalsPro.Demo.Client.Customizations.Components.Documentation.ApiDocumentation.type | components.PowerPortalsPro.Demo.Client.Customizations.Components.Documentation.ApiDocumentation.default | components.PowerPortalsPro.Demo.Client.Customizations.Components.Documentation.ApiDocumentation.description |
|---|---|---|---|
Table | string | この権限ハンドラーが適用されるテーブルの論理名。 |
Tablecomponents.PowerPortalsPro.Demo.Client.Customizations.Components.Documentation.ApiDocumentation.methods
components.PowerPortalsPro.Demo.Client.Customizations.Components.Documentation.ApiDocumentation.name | components.PowerPortalsPro.Demo.Client.Customizations.Components.Documentation.ApiDocumentation.parameters | components.PowerPortalsPro.Demo.Client.Customizations.Components.Documentation.ApiDocumentation.type | components.PowerPortalsPro.Demo.Client.Customizations.Components.Documentation.ApiDocumentation.description |
|---|---|---|---|
CanAppendAsync | Guid? userId | Task<bool> | ユーザーがレコードを追加できるかどうかを判断する方法。 |
CanAppendToAsync | Guid? userId | Task<bool> | ユーザーがレコードに付加できるかどうかを判断する方法。 |
CanCreateAsync | Guid? userId | Task<bool> | ユーザーがレコードを作成できるかどうかを判断する方法。 |
CanDeleteAsync | Guid? userId | Task<bool> | ユーザーがレコードを削除できるかどうかを判断する方法。 |
CanReadAsync | Guid? userId | Task<bool> | ユーザーがレコードを読み取れるかどうかを判断する方法。 |
CanUpdateAsync | Guid? userId | Task<bool> | ユーザーがレコードを更新できるかどうかを判断する方法。 |
CanAppendAsyncCanAppendToAsyncCanCreateAsyncCanDeleteAsyncCanReadAsyncCanUpdateAsyncITableRecordPermissionHandler Interface
components.PowerPortalsPro.Demo.Client.Customizations.Components.Documentation.ApiDocumentation.properties
components.PowerPortalsPro.Demo.Client.Customizations.Components.Documentation.ApiDocumentation.name | components.PowerPortalsPro.Demo.Client.Customizations.Components.Documentation.ApiDocumentation.type | components.PowerPortalsPro.Demo.Client.Customizations.Components.Documentation.ApiDocumentation.default | components.PowerPortalsPro.Demo.Client.Customizations.Components.Documentation.ApiDocumentation.description |
|---|---|---|---|
RequiredColumns | List<string> | このハンドラがレコードレベルの権限を評価するために取得しなければならない列の論理名の一覧。 | |
Table | string | この権限ハンドラーが適用されるテーブルの論理名。 |
RequiredColumnsTablecomponents.PowerPortalsPro.Demo.Client.Customizations.Components.Documentation.ApiDocumentation.methods
components.PowerPortalsPro.Demo.Client.Customizations.Components.Documentation.ApiDocumentation.name | components.PowerPortalsPro.Demo.Client.Customizations.Components.Documentation.ApiDocumentation.parameters | components.PowerPortalsPro.Demo.Client.Customizations.Components.Documentation.ApiDocumentation.type | components.PowerPortalsPro.Demo.Client.Customizations.Components.Documentation.ApiDocumentation.description |
|---|---|---|---|
CanAppendAsync | Guid? userId TableRecord record | Task<bool> | ユーザーが提供されたレコードを付加できるかどうかを判断する方法。 |
CanAppendToAsync | Guid? userId TableRecord record | Task<bool> | ユーザーが提供されたレコードに付加可能かどうかを判断する方法。 |
CanCreateAsync | Guid? userId TableRecord record | Task<bool> | ユーザーが提供されたレコードを作成できるかどうかを判断する方法。 |
CanDeleteAsync | Guid? userId TableRecord record | Task<bool> | ユーザーが提供されたレコードを削除できるかどうかを判断する方法。 |
CanReadAsync | Guid? userId TableRecord record | Task<bool> | ユーザーが提供されたレコードを読めるかどうかを判断する方法。 |
CanUpdateAsync | Guid? userId TableRecord recordWithUpdates TableRecord currentRecord | Task<bool> | ユーザーが提供されたレコードを更新できるかどうかを判断する方法。 |
CanAppendAsyncTableRecord record
CanAppendToAsyncTableRecord record
CanCreateAsyncTableRecord record
CanDeleteAsyncTableRecord record
CanReadAsyncTableRecord record
CanUpdateAsyncTableRecord recordWithUpdates
TableRecord currentRecord
IFetchXmlQueryFilterInterceptor Interface
components.PowerPortalsPro.Demo.Client.Customizations.Components.Documentation.ApiDocumentation.properties
components.PowerPortalsPro.Demo.Client.Customizations.Components.Documentation.ApiDocumentation.name | components.PowerPortalsPro.Demo.Client.Customizations.Components.Documentation.ApiDocumentation.type | components.PowerPortalsPro.Demo.Client.Customizations.Components.Documentation.ApiDocumentation.default | components.PowerPortalsPro.Demo.Client.Customizations.Components.Documentation.ApiDocumentation.description |
|---|---|---|---|
Table | string | この権限ハンドラーが適用されるテーブルの論理名。 |
Tablecomponents.PowerPortalsPro.Demo.Client.Customizations.Components.Documentation.ApiDocumentation.methods
components.PowerPortalsPro.Demo.Client.Customizations.Components.Documentation.ApiDocumentation.name | components.PowerPortalsPro.Demo.Client.Customizations.Components.Documentation.ApiDocumentation.parameters | components.PowerPortalsPro.Demo.Client.Customizations.Components.Documentation.ApiDocumentation.type | components.PowerPortalsPro.Demo.Client.Customizations.Components.Documentation.ApiDocumentation.description |
|---|---|---|---|
CanAppendAsync | Guid? userId | Task<bool> | ユーザーがレコードを追加できるかどうかを判断する方法。 |
CanAppendToAsync | Guid? userId | Task<bool> | ユーザーがレコードに付加できるかどうかを判断する方法。 |
CanCreateAsync | Guid? userId | Task<bool> | ユーザーがレコードを作成できるかどうかを判断する方法。 |
CanDeleteAsync | Guid? userId | Task<bool> | ユーザーがレコードを削除できるかどうかを判断する方法。 |
CanReadAsync | Guid? userId | Task<bool> | ユーザーがレコードを読み取れるかどうかを判断する方法。 |
CanUpdateAsync | Guid? userId | Task<bool> | ユーザーがレコードを更新できるかどうかを判断する方法。 |
OnQueryAsync | FetchXMLBuilder fetchXmlBuilder FetchXmlParameters parameters | Task<FetchXMLBuilder> | FetchXMLクエリを実行前に修正するために呼び出されます。 |
CanAppendAsyncCanAppendToAsyncCanCreateAsyncCanDeleteAsyncCanReadAsyncCanUpdateAsyncOnQueryAsyncFetchXmlParameters parameters
