Implem / Implem.Pleasanter

Pleasanter is a no-code/low-code development platform that runs on .NET. You can quickly create business applications with simple operations.
https://pleasanter.org
GNU Affero General Public License v3.0
511 stars 81 forks source link

「APIを許可」されていないユーザーでサーバースクリプトの Items.Get でレコードを取得できない #415

Closed hrtkz closed 1 year ago

hrtkz commented 1 year ago

バージョン1.3.5.1 では、

let results = items.Get(SITE_ID, '{"View":{"ColumnFilterHash":{"ClassA":"[\\"' + data + '\\"]"}}}');
return results[0].Manager;

のコードで値を取得できているのですが、

バージョン 1.3.16.3 では、同じコードで、

Error: Index was outside the bounds of the array

が発生して値が取得できません。

バージョンアップの過程でサーバスクリプトのコードの書き方になにか変更が必要でしょうか。

hrtkz commented 1 year ago

コードが動作しない原因ですが、ログインユーザーの「APIを許可」の設定によるものかと思われます。

「APIを許可」を与えられているユーザーはItems.Get でレコードが取得できますが、 「APIを許可」の許可が与えられていないユーザーはItems.Get で正常にレコードが取得できないようです。

サーバースクリプトの Items.Get を動作させるには「APIを許可」の権限を与える必要があるように 仕様変更が入っておりますでしょうか。

uchi-ta commented 1 year ago

下記の仕様変更の影響の可能性があります。確認してみてください。

既定のAPIバージョン 1.1 への変更および旧バージョンとの互換性について https://pleasanter.org/manual/default-api-version-1-1

hrtkz commented 1 year ago

コメントありがとうございます。

既定のAPIバージョン 1.1 への変更および旧バージョンとの互換性について https://pleasanter.org/manual/default-api-version-1-1

上記 API バージョンの変更に伴い、サーバスクリプトで Items.Get の正しい実行には、 「APIを許可」の権限が必要になったということでしょうか。

頂いたURLでは上記理解できませんでしたので、ご教示頂けますと幸いです。

github-actions[bot] commented 1 year ago

This issue is stale because it has been open 60 days with no activity. Remove stale label or comment or this will be closed in 7 days.

github-actions[bot] commented 1 year ago

This issue was closed because it has been stalled for 7 days with no activity.