Skip to content

Commit

Permalink
Added new features / Bug fixed
Browse files Browse the repository at this point in the history
・サーバスクリプトで添付ファイルのJSONを取得する機能を追加。
・サーバスクリプトでCommentsのJSONを取得する機能を追加。
・チェック項目のスタイルにワイドが使用できない問題を解消。
・ロック項目のフィルタの解除時にロック以外の項目が表示される問題を解消。
・読み取り専用のレコードでロック解除が行える問題を解消。
・BinaryStorage.jsonのProviderがLocalの場合に項目の詳細設定の容量制限が正しく表示されない問題を解消。
・親レコードのリンクボタンから子レコードを新規作成した際に、リンク項目の変更ができない問題を解消。
・フィルタ操作との組み合わせによって履歴の削除が正しく行えない問題を解消。
・フィルタ操作との組み合わせによってごみ箱からの復元が正しく行えない問題を解消。
・スピナーをスピンした際に自動ポストバックが動作しない問題を解消。
・自動ポストバック後に項目連携の絞り込みが動作しない問題を解消。
  • Loading branch information
uchi-ta committed Dec 19, 2022
1 parent 02d84f9 commit 813213f
Show file tree
Hide file tree
Showing 38 changed files with 271 additions and 143 deletions.
2 changes: 1 addition & 1 deletion Implem.CodeDefiner/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ RUN dotnet publish "Implem.CodeDefiner/Implem.CodeDefiner.csproj" -c Release -o
RUN dotnet publish "Implem.Pleasanter/Implem.Pleasanter.csproj" -c Release -o /app/publish/Implem.Pleasanter
RUN curl -o /usr/bin/jq -L https://github.com/stedolan/jq/releases/download/jq-1.6/jq-linux64 && chmod +x /usr/bin/jq && \
cat Implem.Pleasanter/App_Data/Parameters/Rds.json \
| jq '.Dbms|="PostgreSQL"' \
| jq '.Dbms|="PostgreSQL" | .SaConnectionString|=null | .OwnerConnectionString|=null | .UserConnectionString|=null' \
> /app/publish/Implem.Pleasanter/App_Data/Parameters/Rds.json

FROM base AS final
Expand Down
6 changes: 3 additions & 3 deletions Implem.CodeDefiner/Implem.CodeDefiner.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@
<TargetFramework>net6.0</TargetFramework>
<Copyright>Copyright © Implem Inc 2014 - 2022</Copyright>
<Description>This program does the automatic code creation and merging of existing code based on the definition. Also it will make the configuration change of sql server database.</Description>
<AssemblyVersion>1.3.26.1</AssemblyVersion>
<FileVersion>1.3.26.1</FileVersion>
<Version>1.3.26.1</Version>
<AssemblyVersion>1.3.27.0</AssemblyVersion>
<FileVersion>1.3.27.0</FileVersion>
<Version>1.3.27.0</Version>
<DockerDefaultTargetOS>Linux</DockerDefaultTargetOS>
</PropertyGroup>

Expand Down
6 changes: 3 additions & 3 deletions Implem.DefinitionAccessor/Implem.DefinitionAccessor.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@
<PropertyGroup>
<TargetFramework>net6.0</TargetFramework>
<Copyright>Copyright © Implem Inc 2014 - 2022</Copyright>
<AssemblyVersion>1.3.26.1</AssemblyVersion>
<FileVersion>1.3.26.1</FileVersion>
<Version>1.3.26.1</Version>
<AssemblyVersion>1.3.27.0</AssemblyVersion>
<FileVersion>1.3.27.0</FileVersion>
<Version>1.3.27.0</Version>
<Nullable>disable</Nullable>
</PropertyGroup>

Expand Down
6 changes: 3 additions & 3 deletions Implem.DisplayAccessor/Implem.DisplayAccessor.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@
<PropertyGroup>
<TargetFramework>net6.0</TargetFramework>
<Copyright>Copyright © Implem Inc 2014 - 2022</Copyright>
<AssemblyVersion>1.3.26.1</AssemblyVersion>
<FileVersion>1.3.26.1</FileVersion>
<Version>1.3.26.1</Version>
<AssemblyVersion>1.3.27.0</AssemblyVersion>
<FileVersion>1.3.27.0</FileVersion>
<Version>1.3.27.0</Version>
<Nullable>disable</Nullable>
</PropertyGroup>

Expand Down
6 changes: 3 additions & 3 deletions Implem.Factory/Implem.Factory.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@
<PropertyGroup>
<TargetFramework>net6.0</TargetFramework>
<Copyright>Copyright © Implem Inc 2014 - 2022</Copyright>
<AssemblyVersion>1.3.26.1</AssemblyVersion>
<FileVersion>1.3.26.1</FileVersion>
<Version>1.3.26.1</Version>
<AssemblyVersion>1.3.27.0</AssemblyVersion>
<FileVersion>1.3.27.0</FileVersion>
<Version>1.3.27.0</Version>
<Nullable>disable</Nullable>
</PropertyGroup>

Expand Down
6 changes: 3 additions & 3 deletions Implem.Libraries/Implem.Libraries.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@
<PropertyGroup>
<TargetFramework>net6.0</TargetFramework>
<Copyright>Copyright © Implem Inc 2014 - 2022</Copyright>
<AssemblyVersion>1.3.26.1</AssemblyVersion>
<FileVersion>1.3.26.1</FileVersion>
<Version>1.3.26.1</Version>
<AssemblyVersion>1.3.27.0</AssemblyVersion>
<FileVersion>1.3.27.0</FileVersion>
<Version>1.3.27.0</Version>
<Nullable>disable</Nullable>
</PropertyGroup>

Expand Down
6 changes: 3 additions & 3 deletions Implem.ParameterAccessor/Implem.ParameterAccessor.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@
<PropertyGroup>
<TargetFramework>net6.0</TargetFramework>
<Copyright>Copyright © Implem Inc 2014 - 2022</Copyright>
<AssemblyVersion>1.3.26.1</AssemblyVersion>
<FileVersion>1.3.26.1</FileVersion>
<Version>1.3.26.1</Version>
<AssemblyVersion>1.3.27.0</AssemblyVersion>
<FileVersion>1.3.27.0</FileVersion>
<Version>1.3.27.0</Version>
<Nullable>disable</Nullable>
</PropertyGroup>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ if (queryStringsSiteId > 0)
context: context,
columnName: link.ColumnName))
.Where(column => column != null)
.Where(column => !formData.Any(o => o.Key == $"#TableName#_{column.ColumnName}"))
.ForEach(column =>
{
id = column.MultipleSelections == true
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -83,9 +83,8 @@ private static int DeleteHistory(
sub: Rds.Select#TableName#(
tableType: Sqls.TableTypes.History,
column: Rds.#TableName#Column().#ModelName#Id(),
where: Views.GetBySession(
context: context,
ss: ss).Where(
where: new View()
.Where(
context: context,
ss: ss)))),
Rds.RowCount()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,7 @@ private static ResponseCollection EditorFields(
serverScriptModelRow: serverScriptModelRow),
_using: ss.SwitchCommandButtonsAutoPostBack == true)
.Val("#ControlledOrder", context.ControlledOrder?.ToJson())
.Invoke("initRelatingColumnEditor")
.Messages(context.Messages);
return ret;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,13 @@
public static int Restore(
Context context, SiteSettings ss, List<long> selected, bool negative = false)
{
var subWhere = Views.GetBySession(
context: context,
ss: ss)
.Where(
context: context,
ss: ss,
itemJoin: false);
var where = Rds.#TableName#Where()
.SiteId(
value: ss.SiteId,
Expand All @@ -62,13 +69,13 @@ public static int Restore(
sub: Rds.Select#TableName#(
tableType: Sqls.TableTypes.Deleted,
column: Rds.#TableName#Column().#ModelName#Id(),
where: Views.GetBySession(
join: ss.Join(
context: context,
ss: ss)
.Where(
context: context,
ss: ss,
itemJoin: false)));
join: new IJoin[]
{
subWhere
}),
where: subWhere));
var sub = Rds.Select#TableName#(
tableType: Sqls.TableTypes.Deleted,
_as: "#TableName#_Deleted",
Expand Down Expand Up @@ -107,6 +114,10 @@ public static int Restore(
})
.Where(o => o.attachments.Length > 0);
var guid = Strings.NewGuid();
var itemsSub = Rds.SelectItems(
tableType: Sqls.TableTypes.Deleted,
column: Rds.ItemsColumn().ReferenceId(),
where: Rds.ItemsWhere().ReferenceType(guid));
var count = Repository.ExecuteScalar_response(
context: context,
connectionString: Parameters.Rds.OwnerConnectionString,
Expand All @@ -122,15 +133,13 @@ public static int Restore(
.ReferenceType(guid)),
Rds.Restore#TableName#(
factory: context,
where: where),
where: Rds.#TableName#Where()
.#ModelName#Id_In(sub: itemsSub)),
Rds.RowCount(),
Rds.RestoreBinaries(
factory: context,
where: Rds.BinariesWhere()
.ReferenceId_In(sub: Rds.SelectItems(
tableType: Sqls.TableTypes.Deleted,
column: Rds.ItemsColumn().ReferenceId(),
where: Rds.ItemsWhere().ReferenceType(guid)))
.ReferenceId_In(sub: itemsSub)
.BinaryType("Images")),
Rds.RestoreItems(
factory: context,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,8 @@
formData: context.Forms);
var invalid = #ModelName#Validators.OnUnlockRecord(
context: context,
ss: ss);
ss: ss,
#modelName#Model: #modelName#Model);
switch (invalid.Type)
{
case Error.Types.None: break;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
public static ErrorData OnUnlockRecord(
Context context, SiteSettings ss, bool api = false)
Context context,
SiteSettings ss,
#ModelName#Model #modelName#Model,
bool api = false)
{

<!--Model_Validator_Api-->
Expand All @@ -8,6 +11,15 @@
{
return new ErrorData(type: Error.Types.NotLockedRecord);
}
if (!context.CanUpdate(
ss: ss,
checkLocked: false)
|| #modelName#Model.ReadOnly)
{
return !context.CanRead(ss: ss)
? new ErrorData(type: Error.Types.NotFound)
: new ErrorData(type: Error.Types.HasNotPermission);
}
if (!context.HasPrivilege && ss.LockedRecordUser.Id != context.UserId)
{
return new ErrorData(type: Error.Types.HasNotPermission);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
"TypeName": "bit",
"Ix3": "2",
"Nullable": "1",
"CheckFilterControlType": 1,
"CopyByDefault": "1",
"SettingEnable": "1",
"LabelText_en": "Locked",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
"TypeName": "bit",
"Ix3": "2",
"Nullable": "1",
"CheckFilterControlType": 1,
"CopyByDefault": "1",
"SettingEnable": "1",
"LabelText_en": "Locked",
Expand Down
5 changes: 3 additions & 2 deletions Implem.Pleasanter/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#See https://aka.ms/containerfastmode to understand how Visual Studio uses this Dockerfile to build your images for faster debugging.
#See https://aka.ms/containerfastmode to understand how Visual Studio uses this Dockerfile to build your images for faster debugging.

FROM mcr.microsoft.com/dotnet/aspnet:6.0 AS base
RUN apt-get update && apt-get install -y libgdiplus curl
Expand Down Expand Up @@ -30,7 +30,8 @@ RUN curl -o /usr/bin/jq -L https://github.com/stedolan/jq/releases/download/jq-1
| jq '.WithoutChangeDefaultPassword|=true | .ShowStartGuide|=false | .Demo|=false' \
> /app/publish/App_Data/Parameters/Service.json
RUN cat App_Data/Parameters/Rds.json \
| jq '.Dbms|="PostgreSQL"' > /app/publish/App_Data/Parameters/Rds.json
| jq '.Dbms|="PostgreSQL" | .SaConnectionString|=null | .OwnerConnectionString|=null | .UserConnectionString|=null' \
> /app/publish/App_Data/Parameters/Rds.json

FROM base AS final
WORKDIR /app
Expand Down
24 changes: 12 additions & 12 deletions Implem.Pleasanter/Implem.Pleasanter.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,10 @@
<Copyright>Copyright © Implem Inc 2014 - 2022</Copyright>
<Description>Business application platform</Description>
<AssemblyName>Implem.Pleasanter</AssemblyName>
<AssemblyVersion>1.3.26.1</AssemblyVersion>
<FileVersion>1.3.26.1</FileVersion>
<AssemblyVersion>1.3.27.0</AssemblyVersion>
<FileVersion>1.3.27.0</FileVersion>
<LangVersion>7.2</LangVersion>
<Version>1.3.26.1</Version>
<Version>1.3.27.0</Version>
<Nullable>disable</Nullable>
<DockerDefaultTargetOS>Linux</DockerDefaultTargetOS>
<DockerComposeProjectPath>..\docker-compose.dcproj</DockerComposeProjectPath>
Expand All @@ -33,13 +33,13 @@

<ItemGroup>
<PackageReference Include="AspNetCoreCurrentRequestContext" Version="2.0.0" />
<PackageReference Include="Azure.Extensions.AspNetCore.DataProtection.Blobs" Version="1.2.1" />
<PackageReference Include="Azure.Extensions.AspNetCore.DataProtection.Blobs" Version="1.2.3" />
<PackageReference Include="Azure.Extensions.AspNetCore.DataProtection.Keys" Version="1.1.0" />
<PackageReference Include="Azure.Identity" Version="1.6.1" />
<PackageReference Include="Azure.Identity" Version="1.8.0" />
<PackageReference Include="BuildBundlerMinifier" Version="3.2.449" />
<PackageReference Include="ClosedXML" Version="0.95.4" />
<PackageReference Include="DocumentFormat.OpenXml" Version="2.16.0" />
<PackageReference Include="MailKit" Version="3.3.0" />
<PackageReference Include="MailKit" Version="3.4.3" />
<PackageReference Include="Microsoft.AspNet.Mvc" Version="5.2.9">
<NoWarn>NU1701</NoWarn>
</PackageReference>
Expand All @@ -49,12 +49,12 @@
<PackageReference Include="Microsoft.AspNet.WebPages" Version="3.2.9">
<NoWarn>NU1701</NoWarn>
</PackageReference>
<PackageReference Include="Microsoft.ClearScript" Version="7.3.1">
<PackageReference Include="Microsoft.ClearScript" Version="7.3.5">
<NoWarn></NoWarn>
</PackageReference>
<PackageReference Include="Microsoft.ClearScript.linux-arm64" Version="7.3.1" />
<PackageReference Include="Microsoft.ClearScript.linux-x64" Version="7.3.1" />
<PackageReference Include="Microsoft.ClearScript.Windows" Version="7.3.1">
<PackageReference Include="Microsoft.ClearScript.linux-arm64" Version="7.3.5" />
<PackageReference Include="Microsoft.ClearScript.linux-x64" Version="7.3.5" />
<PackageReference Include="Microsoft.ClearScript.Windows" Version="7.3.5">
<NoWarn>NU1701</NoWarn>
</PackageReference>
<PackageReference Include="Microsoft.VisualStudio.Azure.Containers.Tools.Targets" Version="1.17.0" />
Expand All @@ -67,8 +67,8 @@
<PackageReference Include="SendGrid.SmtpApi" Version="1.4.6" />
<PackageReference Include="Sustainsys.Saml2" Version="2.9.0" />
<PackageReference Include="Sustainsys.Saml2.AspNetCore2" Version="2.9.0" />
<PackageReference Include="System.Diagnostics.PerformanceCounter" Version="6.0.1" />
<PackageReference Include="System.DirectoryServices" Version="6.0.0" />
<PackageReference Include="System.Diagnostics.PerformanceCounter" Version="7.0.0" />
<PackageReference Include="System.DirectoryServices" Version="7.0.0" />
<PackageReference Include="System.Drawing.Common" Version="5.0.3" />
</ItemGroup>

Expand Down
1 change: 0 additions & 1 deletion Implem.Pleasanter/Libraries/HtmlParts/HtmlBulkUpdate.cs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
using Implem.Pleasanter.Libraries.Settings;
using System;
using System.Collections.Generic;
using System.Linq;
namespace Implem.Pleasanter.Libraries.HtmlParts
{
public static class HtmlBulkUpdate
Expand Down
18 changes: 14 additions & 4 deletions Implem.Pleasanter/Libraries/Security/Permissions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -508,7 +508,11 @@ public static bool CanCreate(this Context context, SiteSettings ss, bool site =
}
}

public static bool CanUpdate(this Context context, SiteSettings ss, bool site = false)
public static bool CanUpdate(
this Context context,
SiteSettings ss,
bool site = false,
bool checkLocked = true)
{
switch (context.Controller)
{
Expand All @@ -534,7 +538,11 @@ public static bool CanUpdate(this Context context, SiteSettings ss, bool site =
}
else
{
return context.ItemsCan(ss: ss, type: Types.Update, site: site);
return context.ItemsCan(
ss: ss,
type: Types.Update,
site: site,
checkLocked: checkLocked);
}
}
}
Expand Down Expand Up @@ -745,9 +753,11 @@ public static bool CanEditGroup(Context context)
private static bool ItemsCan(
this Context context,
SiteSettings ss,
Types type, bool site)
Types type,
bool site,
bool checkLocked = true)
{
if (ss.Locked())
if (checkLocked && ss.Locked())
{
if ((type & Types.Update) == Types.Update) return false;
if ((type & Types.Delete) == Types.Delete) return false;
Expand Down
28 changes: 28 additions & 0 deletions Implem.Pleasanter/Libraries/ServerScripts/ServerScriptUtilities.cs
Original file line number Diff line number Diff line change
Expand Up @@ -190,6 +190,20 @@ private static (string, object) ReadNameValue(
columnName: element.Key,
value: element.Value,
mine: mine)));
values.AddRange(model
.AttachmentsHash
.Select(element => ReadNameValue(
context: context,
ss: ss,
columnName: element.Key,
value: element.Value.ToJson(),
mine: mine)));
values.Add(ReadNameValue(
context: context,
ss: ss,
columnName: "Comments",
value: model.Comments?.ToJson(),
mine: mine));
if (model is IssueModel issueModel)
{
values.Add(ReadNameValue(
Expand Down Expand Up @@ -390,6 +404,20 @@ private static (string, object) ReadNameValue(
columnName: element.Key,
value: element.Value,
mine: mine)));
values.AddRange(model
.SavedAttachmentsHash
.Select(element => ReadNameValue(
context: context,
ss: ss,
columnName: element.Key,
value: element.Value,
mine: mine)));
values.Add(ReadNameValue(
context: context,
ss: ss,
columnName: "Comments",
value: model.SavedComments,
mine: mine));
if (model is IssueModel issueModel)
{
values.Add(ReadNameValue(
Expand Down
Loading

0 comments on commit 813213f

Please sign in to comment.