Repository navigation
Check the right query in static Query.SaveAs, and let the API webhook setup read of an empty table pass - #8240
Draft
StefanMaron wants to merge 4 commits into
Draft
StefanMaron wants to merge 4 commits into
StefanMaron wants to merge 4 commits into
Conversation
The static calls ran the permission check against Session::query_object, which only instance calls set, so the check used the last query of the session or object 0. query_rows now takes the query object; the field is gone. Both static calls look the id up through one function that refuses a query of an uncompiled dependency app and an id a skipped dependency app may own, instead of answering No (al-runner issue 7612).
…ted set The first write of an own table under a Permissions Mock set asks the table's database trigger setup; Base Application's API Webhook Notification Mgt. then asks IsEmpty of API Webhook Subscription, which the set does not grant. BC raises no error there (permissions/SysFlowFieldPerm.al:489-499); the runtime refused the test. Only that read, from codeunit 6153, while a setup is asked, on a table with no row, now runs. Five SysFlowFieldPerm cases pass on BC 28 (al-runner issue 8038).
98743 PARead cases (five per major) and 60026 MockedSet_WithTheGrant_AllowsInsert (BC 28 and 29) pass with the API webhook setup read.
…its neighbors The setup read of API Webhook Subscription now also requires that codeunit 6153 belongs to Base Application. A Rust test shows the empty-table read passes, and that a table with a row, FindFirst, another caller and a codeunit 6153 of another app keep main's refusal.
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
[al-runtime-rs / area-permissions-session-1117 / WAITING: more commits follow on this PR]
Fixes #7612
Refs #8038 (the cells with no grant on Published Application still refuse)
Refs #7586 (GetUrl with 5 arguments, Consistent with a guarded Codeunit.Run, GetTable of a Boolean, filter group 1 under another variable: follow-up commits on this PR)
Refs #8028 (the reporter's OnCompanyOpenCompleted subscriber reads CurrentClientType outside a test method; not measured)
Refs #7638 #7659 #6297 #8160 #8032 #8066 #8092 #8093
What changed
Query.SaveAsCsvandQuery.SaveAsXmlcheck the query of their number. Before, they checked the query of the last instance call in the session.Session::query_objectis deleted;query_rowstakes the object. One lookup refuses a query that was not compiled, or an unknown id that a skipped dependency app may own.IsEmptyread of "API Webhook Subscription" by Base Application's codeunit 6153, while it answersGetDatabaseTableTriggerSetup, passes when that table has no row (permissions/SysFlowFieldPerm.al:489-499).Area table
Query.Openuses, Y24PermExecute.al:62-63), now on the right query. SaveAs itself: PROBE QUEUEDTests
CsvOfDeniedAfterGrantedgot "An error was expected inside an ASSERTERROR statement."), green after.Decisions taken without the owner