You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
check passes access rule constraints with a token MxBuild rejects (build: CE0161) #1843
Since fd51d9f (#1803), check -p reports most access-rule constraints that fail the build with CE0161. These still pass check -p and exec, and mx check (11.14.0, security level Production) then reports:
[error] [CE0161] "Error(s) in XPath constraint." at Access rule of entity 'M.E'
grant read * on entity M.E to M.User where [Title = '[%CurrentDateTime%]']; -- date token on a String
grant read * on entity M.E to M.User where [Title = '[%BeginOfCurrentDay%]']; -- date token on a String
grant read * on entity M.E to M.User where [Title = '[%UserRole_User%]']; -- user role token on a String
grant read * on entity M.E to M.User where [D = '[%UserRole_User%]']; -- user role token on a DateTime
grant read * on entity M.E to M.User where [Cnt = '[%CurrentDateTime%]']; -- quoted token on an Integer
grant read * on entity M.E to M.User where [Cnt = '[%DayLength%]']; -- quoted token on an Integer
grant read * on entity M.E to M.User where [M.E_Kid = '[%CurrentUser%]']; -- M.E_Kid leads to M.Kid, not a user
Why
literalTypeProblem judges [%CurrentUser%] and returns early for every other token ("its type is not modelled here"). And literalTypeProblems only looks up attributes, so '[%CurrentUser%]' compared with an association is never judged.
Expected
check -p reports these at the grant. Measured legal and to stay silent: [D = '[%CurrentDateTime%]'], [D > '[%BeginOfCurrentDay%]'], [M.E_Owner = '[%CurrentUser%]'] (System.User) and [M.E_Acc = '[%CurrentUser%]'] (Administration.Account, a specialization of System.User).
Activity