Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bugfixes for indirect permissions #735

Merged
merged 4 commits into from
Aug 20, 2024

Conversation

StefanMaron
Copy link
Owner

No description provided.

@StefanMaron StefanMaron added the bug Something isn't working label Aug 20, 2024
@StefanMaron StefanMaron self-assigned this Aug 20, 2024
@StefanMaron
Copy link
Owner Author

@Arthurvdv can you have a look why the builds are failing for those old versions here?

@Arthurvdv
Copy link
Collaborator

The problem is caused by namespaces, which aren't there in the beginning of the v12.0 versions of AL.

You need to wrap these with a preprocessor directive, for example see rule 0039:

#if Fall2023RV1
if (page.ContainingNamespace.QualifiedName != "")
return page.ContainingNamespace.QualifiedName + "." + page.Name.QuoteIdentifierIfNeeded();
#endif

@@ -213,20 +214,20 @@ private void CheckProcedureInvocation(IPropertySymbol objectPermissions, string
var objectName = typeAndObjectName[typeEndIndex..].Trim().Trim('"');

// Match against the parameters of the procedure
if (type == "tabledata" && objectName == variableTypeName.ToLowerInvariant())
if (type == "tabledata" && (objectName == variableType.Name.ToLowerInvariant() || objectName.Replace("\"","") == (variableType.OriginalDefinition.ContainingNamespace.QualifiedName.ToLowerInvariant() + "." + variableType.Name.ToLowerInvariant())))
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You can probarly use the .UnquoteIdentifier instead of .Replace(""","")

Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

at this point its just a string, so I dont think that method is available

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's a stringExtension, so I should work

@StefanMaron StefanMaron merged commit 28598a6 into prerelease Aug 20, 2024
41 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants