Finding Objects with explicit permissions, for tables we do not have access to

robbonick
Member Posts: 40
Hi,
I am trying to use some of the source code management tools available in VS Code for C/SIDE.
Specifically this extension - NAVBaas Git
It all seems great, but we are an end user running NAV 2017, and have are having some license issues.
For instance, I want to start my docker container and import all our objects into the container as .txt files.
This works fine, until we hit some objects which have permissions to tables we can't insert into etc.
For example, Report 795 - Adjust Cost - Item Entries, which has the following permissions...
So looking at this object, it has been modified by a previous partner. So we would like to investigate if this is still required, or can it be refactored etc.
I am just wondering if there is a way, through powershell or through some custom page in NAV where I can find out all the objects which have these permissions, on objects we can't insert into etc. So we can investigate each object, and see if we can remove the modification or refactor it to use events.
Importing the objects as a FOB will work fine, but when importing as .txt we get the error and obviously FOB is useless for SCM.
Any advice would be appreciated.
I am trying to use some of the source code management tools available in VS Code for C/SIDE.
Specifically this extension - NAVBaas Git
It all seems great, but we are an end user running NAV 2017, and have are having some license issues.
For instance, I want to start my docker container and import all our objects into the container as .txt files.
This works fine, until we hit some objects which have permissions to tables we can't insert into etc.
For example, Report 795 - Adjust Cost - Item Entries, which has the following permissions...
TableData Item Ledger Entry=rimd,TableData Item Application Entry=r,TableData Value Entry=rimd,TableData Avg. Cost Adjmt. Entry Point=rimd
So looking at this object, it has been modified by a previous partner. So we would like to investigate if this is still required, or can it be refactored etc.
I am just wondering if there is a way, through powershell or through some custom page in NAV where I can find out all the objects which have these permissions, on objects we can't insert into etc. So we can investigate each object, and see if we can remove the modification or refactor it to use events.
Importing the objects as a FOB will work fine, but when importing as .txt we get the error and obviously FOB is useless for SCM.
Any advice would be appreciated.
0
Best Answer
-
Thanks for the input, sometimes the non technical solutions are the best.
In the end I created a script in PowerShell, if you are interested here it is....Import-NAVModules $StandardObjectsPath = "C:\Temp\ObjectCompare\BaseObjects\Standard" $CustomObjectsPath = "C:\Temp\ObjectCompare\BaseObjects\Custom" $DeltaOutputPath = "C:\Temp\ObjectCompare\Output\Delta" $ModWithPermissionsPath = "C:\Temp\ObjectCompare\Output\ModifiedObjectsWithPermissions" $CustomObjectsPath = Join-Path $CustomObjectsPath "*.txt" $CustomObjects = Get-ChildItem $CustomObjectsPath foreach ($CustomObject in $CustomObjects) { $FileToFind = Join-Path $StandardObjectsPath $CustomObject.Name if (Test-Path $FileToFind) { $Result = Compare-NAVApplicationObject -OriginalPath $FileToFind -ModifiedPath $CustomObject.FullName -DeltaPath $DeltaOutputPath if ($Result.CompareResult -eq 'Delta') { $Expression = 'Permissions=TableData' $Result2 = Select-String -Pattern $Expression -Path $CustomObject.FullName -Quiet if ($Result2) { Copy-Item $CustomObject.FullName -Destination $ModWithPermissionsPath } } } }
0
Answers
-
The simple thing would be you use a grep search on your folder for "RIMD" .
Not a very technical solution i know
You can have a look at grepwinFor help, do not use PM, use forum instead, perhaps other people have the same question, or better answers.1 -
Thanks for the input, sometimes the non technical solutions are the best.
In the end I created a script in PowerShell, if you are interested here it is....Import-NAVModules $StandardObjectsPath = "C:\Temp\ObjectCompare\BaseObjects\Standard" $CustomObjectsPath = "C:\Temp\ObjectCompare\BaseObjects\Custom" $DeltaOutputPath = "C:\Temp\ObjectCompare\Output\Delta" $ModWithPermissionsPath = "C:\Temp\ObjectCompare\Output\ModifiedObjectsWithPermissions" $CustomObjectsPath = Join-Path $CustomObjectsPath "*.txt" $CustomObjects = Get-ChildItem $CustomObjectsPath foreach ($CustomObject in $CustomObjects) { $FileToFind = Join-Path $StandardObjectsPath $CustomObject.Name if (Test-Path $FileToFind) { $Result = Compare-NAVApplicationObject -OriginalPath $FileToFind -ModifiedPath $CustomObject.FullName -DeltaPath $DeltaOutputPath if ($Result.CompareResult -eq 'Delta') { $Expression = 'Permissions=TableData' $Result2 = Select-String -Pattern $Expression -Path $CustomObject.FullName -Quiet if ($Result2) { Copy-Item $CustomObject.FullName -Destination $ModWithPermissionsPath } } } }
0
Categories
- All Categories
- 73 General
- 73 Announcements
- 66.6K Microsoft Dynamics NAV
- 18.7K NAV Three Tier
- 38.4K NAV/Navision Classic Client
- 3.6K Navision Attain
- 2.4K Navision Financials
- 116 Navision DOS
- 851 Navision e-Commerce
- 1K NAV Tips & Tricks
- 772 NAV Dutch speaking only
- 617 NAV Courses, Exams & Certification
- 2K Microsoft Dynamics-Other
- 1.5K Dynamics AX
- 320 Dynamics CRM
- 111 Dynamics GP
- 10 Dynamics SL
- 1.5K Other
- 990 SQL General
- 383 SQL Performance
- 34 SQL Tips & Tricks
- 35 Design Patterns (General & Best Practices)
- 1 Architectural Patterns
- 10 Design Patterns
- 5 Implementation Patterns
- 53 3rd Party Products, Services & Events
- 1.6K General
- 1.1K General Chat
- 1.6K Website
- 83 Testing
- 1.2K Download section
- 23 How Tos section
- 252 Feedback
- 12 NAV TechDays 2013 Sessions
- 13 NAV TechDays 2012 Sessions